Show / Hide Table of Contents

Class EpubContentCollectionRef<TLocalContentFileRef, TRemoteContentFileRef>

A container for a subset of content file references within the EPUB book.

Inheritance
object
EpubContentCollectionRef<TLocalContentFileRef, TRemoteContentFileRef>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubContentCollectionRef<TLocalContentFileRef, TRemoteContentFileRef> where TLocalContentFileRef : EpubLocalContentFileRef where TRemoteContentFileRef : EpubRemoteContentFileRef
Type Parameters
Name Description
TLocalContentFileRef

The type of the content file references stored within the Local collection.

TRemoteContentFileRef

The type of the content file references stored within the Remote collection.

Constructors

View Source

EpubContentCollectionRef(ReadOnlyCollection<TLocalContentFileRef>?, ReadOnlyCollection<TRemoteContentFileRef>?)

Initializes a new instance of the EpubContentCollectionRef<TLocalContentFileRef, TRemoteContentFileRef> class.

Declaration
public EpubContentCollectionRef(ReadOnlyCollection<TLocalContentFileRef>? local = null, ReadOnlyCollection<TRemoteContentFileRef>? remote = null)
Parameters
Type Name Description
ReadOnlyCollection<TLocalContentFileRef> local

Local content file references to be stored within this container.

ReadOnlyCollection<TRemoteContentFileRef> remote

Remote content file references to be stored within this container.

Properties

View Source

Local

Gets a collection of local content file references stored within this container.

Declaration
public ReadOnlyCollection<TLocalContentFileRef> Local { get; }
Property type: ReadOnlyCollection<TLocalContentFileRef>
View Source

Remote

Gets a collection of remote content file references stored within this container.

Declaration
public ReadOnlyCollection<TRemoteContentFileRef> Remote { get; }
Property type: ReadOnlyCollection<TRemoteContentFileRef>

Methods

View Source

ContainsLocalFileRefWithFilePath(string)

Determines whether a local content file reference with the specified FilePath value exists in this container.

Declaration
public bool ContainsLocalFileRefWithFilePath(string filePath)
Parameters
Type Name Description
string filePath

The FilePath value of the local content file reference to locate in this container.

Returns
Type Description
bool

true if the local content file reference with the specified FilePath value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

filePath is null.

View Source

ContainsLocalFileRefWithKey(string)

Determines whether a local content file reference with the specified Key value exists in this container.

Declaration
public bool ContainsLocalFileRefWithKey(string key)
Parameters
Type Name Description
string key

The Key value of the local content file reference to locate in this container.

Returns
Type Description
bool

true if the local content file reference with the specified Key value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

key is null.

View Source

ContainsRemoteFileRefWithUrl(string)

Determines whether a remote content file reference with the specified Url value exists in this container.

Declaration
public bool ContainsRemoteFileRefWithUrl(string url)
Parameters
Type Name Description
string url

The Url value of the remote content file reference to locate in this container.

Returns
Type Description
bool

true if the remote content file reference with the specified Url value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

url is null.

View Source

GetLocalFileRefByFilePath(string)

Gets the local content file reference with the specified FilePath value.

Declaration
public TLocalContentFileRef GetLocalFileRefByFilePath(string filePath)
Parameters
Type Name Description
string filePath

The FilePath of the local content file reference to get.

Returns
Type Description
TLocalContentFileRef

The local content file reference with the specified FilePath value.

Exceptions
Type Condition
ArgumentNullException

filePath is null.

EpubContentCollectionRefException

Local content file reference with the specified FilePath value does not exist in this container.

View Source

GetLocalFileRefByKey(string)

Gets the local content file reference with the specified Key value.

Declaration
public TLocalContentFileRef GetLocalFileRefByKey(string key)
Parameters
Type Name Description
string key

The Key of the local content file reference to get.

Returns
Type Description
TLocalContentFileRef

The local content file reference with the specified Key value.

Exceptions
Type Condition
ArgumentNullException

key is null.

EpubContentCollectionRefException

Local content file reference with the specified Key value does not exist in this container.

View Source

GetRemoteFileRefByUrl(string)

Gets the remote content file reference with the specified Url value.

Declaration
public TRemoteContentFileRef GetRemoteFileRefByUrl(string url)
Parameters
Type Name Description
string url

The Url of the remote content file reference to get.

Returns
Type Description
TRemoteContentFileRef

The remote content file reference with the specified Url value.

Exceptions
Type Condition
ArgumentNullException

url is null.

EpubContentCollectionRefException

Remote content file reference with the specified Url value does not exist in this container.

View Source

TryGetLocalFileRefByFilePath(string, out TLocalContentFileRef)

Gets the local content file reference with the specified FilePath value.

Declaration
public bool TryGetLocalFileRefByFilePath(string filePath, out TLocalContentFileRef localContentFileRef)
Parameters
Type Name Description
string filePath

The FilePath of the local content file reference to get.

TLocalContentFileRef localContentFileRef

When this method returns, contains the local content file reference with the specified FilePath value, if such local content file reference exists in the container; otherwise, null.

Returns
Type Description
bool

true if the local content file reference with the specified FilePath value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

filePath is null.

View Source

TryGetLocalFileRefByKey(string, out TLocalContentFileRef)

Gets the local content file reference with the specified Key value.

Declaration
public bool TryGetLocalFileRefByKey(string key, out TLocalContentFileRef localContentFileRef)
Parameters
Type Name Description
string key

The Key of the local content file reference to get.

TLocalContentFileRef localContentFileRef

When this method returns, contains the local content file reference with the specified Key value, if such local content file reference exists in the container; otherwise, null.

Returns
Type Description
bool

true if the local content file reference with the specified Key value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

key is null.

View Source

TryGetRemoteFileRefByUrl(string, out TRemoteContentFileRef)

Gets the remote content file reference with the specified Url value.

Declaration
public bool TryGetRemoteFileRefByUrl(string url, out TRemoteContentFileRef remoteContentFileRef)
Parameters
Type Name Description
string url

The Url of the remote content file reference to get.

TRemoteContentFileRef remoteContentFileRef

When this method returns, contains the remote content file reference with the specified Url value, if such remote content file reference exists in the container; otherwise, null.

Returns
Type Description
bool

true if the remote content file reference with the specified Url value exists in this container; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

url is null.

  • View Source
In this article
Back to top Generated by DocFX