Class ContentFileMissingEventArgs
Provides data for the ContentFileMissing event.
Inherited Members
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class ContentFileMissingEventArgs : EventArgs
Constructors
View SourceContentFileMissingEventArgs(string, string, EpubContentType, string)
Initializes a new instance of the ContentFileMissingEventArgs class with a specified file name, an absolute file path, a content type of the file, and a MIME type of the file's content.
Declaration
public ContentFileMissingEventArgs(string fileKey, string filePath, EpubContentType contentType, string contentMimeType)
Parameters
Type | Name | Description |
---|---|---|
string | fileKey | Relative file path of the missing content file (as it is specified in the EPUB manifest). |
string | filePath | Absolute file path of the missing content file in the EPUB archive. |
EpubContentType | contentType | The type of the content of the missing file. |
string | contentMimeType | The MIME type of the content of the missing file. |
Properties
View SourceContentMimeType
Gets the MIME type of the content of the missing file.
Declaration
public string ContentMimeType { get; }
Property type: string
View SourceContentType
Gets the type of the content of the missing file.
Declaration
public EpubContentType ContentType { get; }
Property type: EpubContentType
View SourceFileKey
Gets the relative file path of the missing content file (as it is specified in the EPUB manifest).
Declaration
public string FileKey { get; }
Property type: string
View SourceFilePath
Gets the absolute file path of the missing content file in the EPUB archive.
Declaration
public string FilePath { get; }
Property type: string
View SourceReplacementContentStream
Gets or sets the replacement content stream. This property allows the application to provide a replacement content for the missing file in the form of a Stream. When the content stream is provided, the EPUB content reader will not throw an exception for the missing file, regardless of the value of the SuppressException property. The content of the stream is read only once, after which it will be cached in the EPUB content reader. The stream will be closed after its content is fully read.
Declaration
public Stream? ReplacementContentStream { get; set; }
Property type: Stream
View SourceSuppressException
Gets or sets a value indicating whether the EPUB content reader should suppress the exception for the missing file. If it is set to true
and the replacement content stream is not provided (via the ReplacementContentStream property), then the EPUB content reader will treat
the missing file as an existing but empty file.
Default value is false
.
Declaration
public bool SuppressException { get; set; }