Refactor data providers and update abstractions

- Removed obsolete data providers: `AnchorCollectionDataProvider`, `ContentsDataProvider`, and others, consolidating logic into new composable providers.
- Added `ComposeDataProviders`, `SelectDataProvider`, and `RelationalDataProvider` for improved flexibility and reusability.
- Introduced `IManySelectionComposableDataProvider` interface to support multiple-node selection.
- Enhanced `UnitDownloader` with more robust progress tracking.
- Updated package references and project dependencies for consistency.
- Improved error handling in `StealthConfig` initialization for better fallback on browser drivers.
- Incremented project version to 2.4.5.
This commit is contained in:
qwsdcvghyu89
2025-11-14 03:41:13 +11:00
parent 2958a26e4f
commit 18c5ad83da
27 changed files with 510 additions and 248 deletions
@@ -0,0 +1,12 @@
using HtmlAgilityPack;
namespace Beam.Abstractions;
public interface IComposableDataProvider : IComposableDataProvider<object> { }
public interface IComposableDataProvider<out T> : IDataProvider<T> {
public T Get(HtmlNode node);
public HtmlNode? Select(HtmlDocument doc);
public HtmlNode? Select(HtmlNode node);
}
@@ -0,0 +1,9 @@
using HtmlAgilityPack;
namespace Beam.Abstractions;
public interface IManySelectionComposableDataProvider<out T> : IDataProvider<T> {
public T ManyGet(HtmlNode[] node);
public HtmlNode[]? SelectMany(HtmlDocument doc);
public HtmlNode[]? SelectMany(HtmlNode[] node);
}