using System; using VersOne.Epub.Schema; namespace VersOne.Epub { /// /// The base class for content files and content file references declared in the EPUB manifest (e.g., HTML files or images). /// public abstract class EpubContentFile { /// /// Initializes a new instance of the class. /// /// The content file key as it is declared in the EPUB manifest (in the property). /// The type of the content of the file. /// The MIME type of the content of the file. /// The parameter is null. protected EpubContentFile(string key, EpubContentType contentType, string contentMimeType) { Key = key ?? throw new ArgumentNullException(nameof(key)); ContentType = contentType; ContentMimeType = contentMimeType ?? throw new ArgumentNullException(nameof(contentMimeType)); } /// /// Gets the content file key as it is declared in the EPUB manifest (in the property). /// This is either a relative path of the content file within the EPUB archive (for local content files) /// or an absolute URI of the content file outside of the EPUB archive (for remote content files). /// public string Key { get; } /// /// Gets the type of the content of the file (e.g. or ). /// public EpubContentType ContentType { get; } /// /// Gets the MIME type of the content of the file. /// public string ContentMimeType { get; } /// /// Gets the location of the content file (local or remote). /// public abstract EpubContentLocation ContentLocation { get; } /// /// Gets the type of the content file (text or byte array). /// public abstract EpubContentFileType ContentFileType { get; } } }