Class ContentDownloaderOptions
Various options to configure the behavior of the EPUB content downloader which is used for downloading remote content files.
Inherited Members
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class ContentDownloaderOptions
Constructors
View SourceContentDownloaderOptions(EpubReaderOptionsPreset?)
Initializes a new instance of the ContentDownloaderOptions class.
Declaration
public ContentDownloaderOptions(EpubReaderOptionsPreset? preset = null)
Parameters
Type | Name | Description |
---|---|---|
EpubReaderOptionsPreset? | preset | An optional preset to initialize the ContentDownloaderOptions class with a predefined set of options. |
Properties
View SourceCustomContentDownloader
Gets or sets a reference to the custom content downloader.
If it's set to null
, the built-in content downloader will be used to download remote content files.
Default value is null
.
Declaration
public IContentDownloader? CustomContentDownloader { get; set; }
Property type: IContentDownloader
View SourceDownloadContent
Gets or sets a value indicating whether the content downloader should download remote resources specified in the EPUB manifest.
If it's set to false
, then Content and Content will always be null
and EpubRemoteContentFileRef will throw a "Downloading remote content is prohibited by the ContentDownloaderOptions.DownloadContent option" exception.
Default value is false
.
Declaration
public bool DownloadContent { get; set; }
Property type: bool
View SourceDownloaderUserAgent
Gets or sets the user agent presented by the content downloader. This value is used by the built-in downloader to set the User-Agent
header of the HTTP request.
If this value is set to null
, then the following user agent value will be used: "EpubReader/version" where "version" is the current version of the EpubReader library.
Default value is null
.
Declaration
public string? DownloaderUserAgent { get; set; }