namespace VersOne.Epub.Options
{
///
/// Various options to configure the behavior of the EPUB book cover reader which is used for loading the EPUB book cover image.
///
public class BookCoverReaderOptions
{
///
/// Initializes a new instance of the class.
///
/// An optional preset to initialize the class with a predefined set of options.
public BookCoverReaderOptions(EpubReaderOptionsPreset? preset = null)
{
switch (preset)
{
case EpubReaderOptionsPreset.RELAXED:
case EpubReaderOptionsPreset.IGNORE_ALL_ERRORS:
Epub2MetadataIgnoreMissingManifestItem = true;
break;
}
}
///
/// Gets or sets a value indicating whether EPUB 2 book cover reader should ignore the error when the manifest item referenced by
/// the EPUB 2 cover metadata item is missing.
/// If it's set to false and the manifest item with the given ID is not present, then
/// the "Incorrect EPUB manifest: item with ID = "..." referenced in EPUB 2 cover metadata is missing" exception will be thrown.
/// Default value is false.
///
public bool Epub2MetadataIgnoreMissingManifestItem { get; set; }
}
}