Class EpubContentCollection<TLocalContentFile, TRemoteContentFile>
A container for a subset of content files within the EPUB book.
Inherited Members
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 SourceEpubContentCollection(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 SourceLocal
Gets a collection of local content files stored within this container.
Declaration
public ReadOnlyCollection<TLocalContentFile> Local { get; }
Property type: ReadOnlyCollection<TLocalContentFile>
View SourceRemote
Gets a collection of remote content files stored within this container.
Declaration
public ReadOnlyCollection<TRemoteContentFile> Remote { get; }
Property type: ReadOnlyCollection<TRemoteContentFile>
Methods
View SourceContainsLocalFileWithFilePath(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 |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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 |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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 |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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 |
|
EpubContentCollectionException | Local content file with the specified FilePath value does not exist in this container. |
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 |
|
EpubContentCollectionException | Local content file with the specified Key value does not exist in this container. |
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 |
|
EpubContentCollectionException | Remote content file with the specified Url value does not exist in this container. |
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, |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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, |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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, |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|