Files
Beam/Beam.Temporary.Cli/Architecture.cs
T
qwsdcvghyu89 a7d148a96f Introduce Beam.Fluent and Beam.Models projects
Added new Beam.Fluent and Beam.Models projects with staged download builder and data context models. Refactored and moved model classes from Beam.Temporary.Cli to Beam.Models. Added new data providers and extended DataBindings in Beam.Dynamic. Renamed Beam.Puppeteer to Beam.Playwright and updated related classes. Updated project references and package versions. Removed obsolete and unused files from Beam.Temporary.Cli.
2025-09-18 18:32:25 +10:00

53 lines
3.1 KiB
C#

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 {
/// <summary>
/// <para>
/// 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.
/// </para>
/// </summary>
public partial interface IArchitecture {
///// <summary>
///// Gets the metadata associated with a <see cref="ResourceDictionary"/>
///// </summary>
///// <param name="web">The web client to use when downloading <see cref="WebResource"/>s</param>
///// <param name="pieceKey">The key of the <see cref="ResourceDictionary"/> stored in the <paramref name="sdd"/></param>
///// <param name="sdd">The <see cref="BeamDataDictionary"/> to be used to retrieve information</param>
///// <param name="logger">Optional logger for logging debug information</param>
///// <returns>A <see cref="DownloadContext{T}"/> object with the required information to perform the download</returns>
//public DownloadContext<IDocumentMetaData>? GetMeta(HtmlWeb web, DataKey<ResourceDictionary> pieceKey, BeamDataDictionary sdd, CancellationToken ct = default, ILogger? logger = null);
///// <summary>
///// Gets the <see cref="DownloadContext{T}"/> of the text record associated with <see cref="ResourceDictionary"/>
///// </summary>
///// <param name="web">The web client to use when downloading <see cref="WebResource"/>s</param>
///// <param name="pieceKey">The key of the <see cref="ResourceDictionary"/> stored in the <paramref name="sdd"/></param>
///// <param name="sdd">The <see cref="BeamDataDictionary"/> to be used to retrieve information</param>
///// <param name="metadata">Optional book metadata to include with the final text record</param>
///// <param name="logger">Optional logger for logging debug information</param>
///// <returns>A <see cref="DownloadContext{T}"/> object with the required information to perform the download</returns>
//public DownloadContext<IDocument>? GetTextRecord(HtmlWeb web, DataKey<ResourceDictionary> pieceKey, BeamDataDictionary sdd, IDocumentMetaData? metadata = null, CancellationToken ct = default, ILogger? logger = null);
/// <summary>
/// The <see cref="DataKey{IDocumentMetaData}"/> to use when looking for the chapter metadata
/// </summary>
public DataKey<IDocumentMetaData> ChapterKey { get; set; }
/// <summary>
/// The <see cref="DataKey{IDocumentMetaData}"/> to use when looking for the book metadata
/// </summary>
public DataKey<IDocumentMetaData> BookKey { get; set; }
/// <summary>
/// The default architecture
/// </summary>
public static IArchitecture Default => new MainArchitecture();
}
}