using aeqw89.DataKeys; using HtmlAgilityPack; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Beam.Temporary.Cli { /// /// /// A collection of specific useful methods and constants that facilitate the use of the application; allows other parts of the application to depend on architecture-specific arbitrary choices without compromising the Single-Responsibility principle or increasing redundant code. /// /// public partial interface IArchitecture { /// /// Gets the metadata associated with a /// /// The web client to use when downloading s /// The key of the stored in the /// The to be used to retrieve information /// Optional logger for logging debug information /// A object with the required information to perform the download public DownloadContext? GetMeta(HtmlWeb web, DataKey pieceKey, BeamDataDictionary sdd, CancellationToken ct = default, ILogger? logger = null); /// /// Gets the of the text record associated with /// /// The web client to use when downloading s /// The key of the stored in the /// The to be used to retrieve information /// Optional book metadata to include with the final text record /// Optional logger for logging debug information /// A object with the required information to perform the download public DownloadContext? GetTextRecord(HtmlWeb web, DataKey pieceKey, BeamDataDictionary sdd, IDocumentMetaData? metadata = null, CancellationToken ct = default, ILogger? logger = null); /// /// The to use when looking for the chapter metadata /// public DataKey ChapterKey { get; set; } /// /// The to use when looking for the book metadata /// public DataKey BookKey { get; set; } /// /// The default architecture /// public static IArchitecture Default => new MainArchitecture(); } }