using System; using System.Collections.Generic; namespace VersOne.Epub { /// /// Represents a EPUB book with all its content and metadata. /// public class EpubBook { /// /// Initializes a new instance of the class. /// /// The path to the EPUB file or null if the EPUB file is being loaded from a stream. /// The title of the book. /// A comma separated list of the book's authors. /// A list of book's authors names. /// The book's description or null if the description is not present in the book. /// The book's cover image or null if there is no cover. /// A list of text content files in the order of reading intended by the author. /// A list of navigation elements of the book (typically the table of contents) or null if the book doesn't have navigation information. /// The parsed EPUB schema of the book. /// The collection of the book's content files. /// The parameter is null. /// The parameter is null. /// The parameter is null. /// The parameter is null. public EpubBook(string? filePath, string title, string author, List? authorList, string? description, byte[]? coverImage, List? readingOrder, List? navigation, EpubSchema schema, EpubContent content) { FilePath = filePath; Title = title ?? throw new ArgumentNullException(nameof(title)); Author = author ?? throw new ArgumentNullException(nameof(author)); AuthorList = authorList ?? new List(); Description = description; CoverImage = coverImage; ReadingOrder = readingOrder ?? new List(); Navigation = navigation; Schema = schema ?? throw new ArgumentNullException(nameof(schema)); Content = content ?? throw new ArgumentNullException(nameof(content)); } /// /// Gets the path to the EPUB file or null if the EPUB file was loaded from a stream. /// public string? FilePath { get; } /// /// Gets the title of the book. /// public string Title { get; } /// /// Gets a comma separated list of the book's authors. /// public string Author { get; } /// /// Gets a list of book's authors names. /// public List AuthorList { get; } /// /// Gets the book's description or null if the description is not present in the book. /// public string? Description { get; } /// /// Gets the book's cover image or null if there is no cover. /// public byte[]? CoverImage { get; } /// /// Gets a list of text content files in the order of reading intended by the author. /// public List ReadingOrder { get; } /// /// Gets a list of navigation elements of the book (typically the table of contents) or null if the book doesn't have navigation information. /// public List? Navigation { get; } /// /// Gets the parsed EPUB schema of the book. /// public EpubSchema Schema { get; } /// /// Gets the collection of the book's content files. /// public EpubContent Content { get; } } }