Interface IEpubContentLoader
Provides methods for loading content files.
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public interface IEpubContentLoader
Methods
View SourceGetContentStream(EpubContentFileRefMetadata)
Opens the file and returns a Stream to access its content.
Declaration
Stream GetContentStream(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
Stream | A Stream to access the file's content. |
GetContentStreamAsync(EpubContentFileRefMetadata)
Asynchronously opens the file and returns a Stream to access its content.
Declaration
Task<Stream> GetContentStreamAsync(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
Task<Stream> | A task that represents the asynchronous open operation. The value of the TResult parameter contains the Stream to access the file's content. |
LoadContentAsBytes(EpubContentFileRefMetadata)
Loads the whole content of the file and returns it as a byte array.
Declaration
byte[] LoadContentAsBytes(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
byte[] | Content of the file. |
LoadContentAsBytesAsync(EpubContentFileRefMetadata)
Asynchronously loads the whole content of the file and returns it as a byte array.
Declaration
Task<byte[]> LoadContentAsBytesAsync(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
Task<byte[]> | A task that represents the asynchronous load operation. The value of the TResult parameter contains the content of the file. |
LoadContentAsText(EpubContentFileRefMetadata)
Loads the whole content of the file and returns it as a string.
Declaration
string LoadContentAsText(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
string | Content of the file. |
LoadContentAsTextAsync(EpubContentFileRefMetadata)
Asynchronously loads the whole content of the file and returns it as a string.
Declaration
Task<string> LoadContentAsTextAsync(EpubContentFileRefMetadata contentFileRefMetadata)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | contentFileRefMetadata | Metadata of the content file reference to load. |
Returns
Type | Description |
---|---|
Task<string> | A task that represents the asynchronous load operation. The value of the TResult parameter contains the content of the file. |