Show / Hide Table of Contents

Class EpubLocalTextContentFileRef

A reference for a file within the EPUB archive which allows to read its content as a string. Unlike EpubLocalTextContentFile, this class contains only a reference to the file but doesn't contain its content.

Inheritance
object
EpubContentFileRef
EpubLocalContentFileRef
EpubLocalTextContentFileRef
Inherited Members
EpubLocalContentFileRef.FilePath
EpubLocalContentFileRef.ContentLocation
EpubLocalContentFileRef.ReadContentAsBytes()
EpubLocalContentFileRef.ReadContentAsBytesAsync()
EpubLocalContentFileRef.ReadContentAsText()
EpubLocalContentFileRef.ReadContentAsTextAsync()
EpubLocalContentFileRef.GetContentStream()
EpubLocalContentFileRef.GetContentStreamAsync()
EpubContentFileRef.Key
EpubContentFileRef.ContentType
EpubContentFileRef.ContentMimeType
EpubContentFileRef.Metadata
EpubContentFileRef.EpubContentLoader
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 EpubLocalTextContentFileRef : EpubLocalContentFileRef

Constructors

View Source

EpubLocalTextContentFileRef(EpubContentFileRefMetadata, string, IEpubContentLoader)

Initializes a new instance of the EpubLocalTextContentFileRef class with a specified EPUB book reference, a file name, a content type of the file, and a MIME type of the file's content.

Declaration
public EpubLocalTextContentFileRef(EpubContentFileRefMetadata metadata, string filePath, IEpubContentLoader epubContentLoader)
Parameters
Type Name Description
EpubContentFileRefMetadata metadata

Metadata of this content file reference.

string filePath

The absolute path of the local content file in the EPUB archive.

IEpubContentLoader epubContentLoader

A reference to the EPUB content loader which provides methods to load the content of this file.

Exceptions
Type Condition
ArgumentNullException

The metadata parameter is null.

ArgumentNullException

The filePath parameter is null.

ArgumentNullException

The epubContentLoader parameter is null.

Properties

View Source

ContentFileType

Gets the type of the content file which is always TEXT for local text content file references.

Declaration
public override EpubContentFileType ContentFileType { get; }
Property type: EpubContentFileType
Overrides
EpubContentFileRef.ContentFileType

Methods

View Source

ReadContent()

Reads the whole content of the referenced file and returns it as a string.

Declaration
public string ReadContent()
Returns
Type Description
string

Content of the referenced file.

View Source

ReadContentAsync()

Asynchronously reads the whole content of the referenced file and returns it as a string.

Declaration
public Task<string> ReadContentAsync()
Returns
Type Description
Task<string>

A task that represents the asynchronous read operation. The value of the TResult parameter contains the content of the referenced file.

  • View Source
In this article
Back to top Generated by DocFX