Class EpubRemoteTextContentFileRef
A reference for a file located outside of the EPUB archive which allows to read its content as a string. Unlike EpubRemoteTextContentFile, this class contains only a reference to the file but doesn't contain its content.
Inherited Members
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public class EpubRemoteTextContentFileRef : EpubRemoteContentFileRef
Constructors
View SourceEpubRemoteTextContentFileRef(EpubContentFileRefMetadata, IEpubContentLoader)
Initializes a new instance of the EpubRemoteTextContentFileRef class with a specified content file key, a content type of the file reference, a MIME type of the file's content, and content downloader options.
Declaration
public EpubRemoteTextContentFileRef(EpubContentFileRefMetadata metadata, IEpubContentLoader epubContentLoader)
Parameters
Type | Name | Description |
---|---|---|
EpubContentFileRefMetadata | metadata | Metadata of this content file reference. |
IEpubContentLoader | epubContentLoader | A reference to the EPUB content loader which provides methods to download the content of this file. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentNullException | The |
Properties
View SourceContentFileType
Gets the type of the content file which is always TEXT for remote text content file references.
Declaration
public override EpubContentFileType ContentFileType { get; }
Property type: EpubContentFileType
Overrides
Methods
View SourceDownloadContent()
Downloads the whole content of the referenced file and returns it as a string.
Declaration
public string DownloadContent()
Returns
Type | Description |
---|---|
string | Content of the referenced file. |
DownloadContentAsync()
Asynchronously downloads the whole content of the referenced file and returns it as a string.
Declaration
public Task<string> DownloadContentAsync()
Returns
Type | Description |
---|---|
Task<string> | A task that represents the asynchronous download operation. The value of the TResult parameter contains the content of the referenced file. |