Added constant state changers to represent singular/repeating states. Added a DownloadContextBuilder to support fluent building patterns. Changed RetryReporter and DownloadReporter to use RetryReport and DownloadReport structs to simplify type declarations. Made MainArchitecture obsolete by supporting a fluent downloads with DownloadBuilder. Created a 'budge' OpenAI bridge for proof-of-concept translation.

This commit is contained in:
qwsdcvghyu89
2025-06-07 00:56:26 +03:00
parent a086cfa02b
commit a9a22ea23d
28 changed files with 809 additions and 145 deletions
+5 -5
View File
@@ -13,26 +13,26 @@ 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.
/// </para>
/// </summary>
partial interface IArchitecture {
public partial interface IArchitecture {
/// <summary>
/// Gets the metadata associated with a <see cref="TextResource"/>
/// </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="TextResource"/> stored in the <paramref name="sdd"/></param>
/// <param name="sdd">The <see cref="SharedDataDictionary"/> to be used to retrieve information</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<TextResource> pieceKey, SharedDataDictionary sdd, ILogger? logger = null);
public DownloadContext<IDocumentMetaData>? GetMeta(HtmlWeb web, DataKey<TextResource> pieceKey, BeamDataDictionary sdd, CancellationToken ct = default, ILogger? logger = null);
/// <summary>
/// Gets the <see cref="DownloadContext{T}"/> of the text record associated with <see cref="TextResource"/>
/// </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="TextResource"/> stored in the <paramref name="sdd"/></param>
/// <param name="sdd">The <see cref="SharedDataDictionary"/> to be used to retrieve information</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<TextResource> pieceKey, SharedDataDictionary sdd, IDocumentMetaData? metadata = null, ILogger? logger = null);
public DownloadContext<IDocument>? GetTextRecord(HtmlWeb web, DataKey<TextResource> 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