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