Show / Hide Table of Contents

Class EpubContentCollection<TLocalContentFile, TRemoteContentFile>

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

Inheritance
object
EpubContentCollection<TLocalContentFile, TRemoteContentFile>
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 EpubContentCollection<TLocalContentFile, TRemoteContentFile> where TLocalContentFile : EpubLocalContentFile where TRemoteContentFile : EpubRemoteContentFile
Type Parameters
Name Description
TLocalContentFile

The type of the content files stored within the Local collection.

TRemoteContentFile

The type of the content files stored within the Remote collection.

Constructors

View Source

EpubContentCollection(ReadOnlyCollection<TLocalContentFile>?, ReadOnlyCollection<TRemoteContentFile>?)

Initializes a new instance of the EpubContentCollection<TLocalContentFile, TRemoteContentFile> class.

Declaration
public EpubContentCollection(ReadOnlyCollection<TLocalContentFile>? local = null, ReadOnlyCollection<TRemoteContentFile>? remote = null)
Parameters
Type Name Description
ReadOnlyCollection<TLocalContentFile> local

Local content files to be stored within this container.

ReadOnlyCollection<TRemoteContentFile> remote

Remote content files to be stored within this container.

Properties

View Source

Local

Gets a collection of local content files stored within this container.

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

Remote

Gets a collection of remote content files stored within this container.

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

Methods

View Source

ContainsLocalFileWithFilePath(string)

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

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

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

Returns
Type Description
bool

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

Exceptions
Type Condition
ArgumentNullException

filePath is null.

View Source

ContainsLocalFileWithKey(string)

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

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

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

Returns
Type Description
bool

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

Exceptions
Type Condition
ArgumentNullException

key is null.

View Source

ContainsRemoteFileWithUrl(string)

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

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

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

Returns
Type Description
bool

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

Exceptions
Type Condition
ArgumentNullException

url is null.

View Source

GetLocalFileByFilePath(string)

Gets the local content file with the specified FilePath value.

Declaration
public TLocalContentFile GetLocalFileByFilePath(string filePath)
Parameters
Type Name Description
string filePath

The FilePath of the local content file to get.

Returns
Type Description
TLocalContentFile

The local content file with the specified FilePath value.

Exceptions
Type Condition
ArgumentNullException

filePath is null.

EpubContentCollectionException

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

View Source

GetLocalFileByKey(string)

Gets the local content file with the specified Key value.

Declaration
public TLocalContentFile GetLocalFileByKey(string key)
Parameters
Type Name Description
string key

The Key of the local content file to get.

Returns
Type Description
TLocalContentFile

The local content file with the specified Key value.

Exceptions
Type Condition
ArgumentNullException

key is null.

EpubContentCollectionException

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

View Source

GetRemoteFileByUrl(string)

Gets the remote content file with the specified Url value.

Declaration
public TRemoteContentFile GetRemoteFileByUrl(string url)
Parameters
Type Name Description
string url

The Url of the remote content file to get.

Returns
Type Description
TRemoteContentFile

The remote content file with the specified Url value.

Exceptions
Type Condition
ArgumentNullException

url is null.

EpubContentCollectionException

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

View Source

TryGetLocalFileByFilePath(string, out TLocalContentFile)

Gets the local content file with the specified FilePath value.

Declaration
public bool TryGetLocalFileByFilePath(string filePath, out TLocalContentFile localContentFile)
Parameters
Type Name Description
string filePath

The FilePath of the local content file to get.

TLocalContentFile localContentFile

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

Returns
Type Description
bool

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

Exceptions
Type Condition
ArgumentNullException

filePath is null.

View Source

TryGetLocalFileByKey(string, out TLocalContentFile)

Gets the local content file with the specified Key value.

Declaration
public bool TryGetLocalFileByKey(string key, out TLocalContentFile localContentFile)
Parameters
Type Name Description
string key

The Key of the local content file to get.

TLocalContentFile localContentFile

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

Returns
Type Description
bool

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

Exceptions
Type Condition
ArgumentNullException

key is null.

View Source

TryGetRemoteFileByUrl(string, out TRemoteContentFile)

Gets the remote content file with the specified Url value.

Declaration
public bool TryGetRemoteFileByUrl(string url, out TRemoteContentFile remoteContentFile)
Parameters
Type Name Description
string url

The Url of the remote content file to get.

TRemoteContentFile remoteContentFile

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

Returns
Type Description
bool

true if the remote content file 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