Refactor downloaders to use ByteDocument and add options builders
Replaces generic RawType with ByteDocument in downloaders and context classes, simplifying type usage. Adds builder classes for FailurePredicateOptions, FragmentOptions, SkipPredicateOptions, and UnitDownloaderOptions to improve configuration flexibility. Introduces DownloadTarget enum and SkipPredicate delegate for more granular download control. Refactors Fluent API interfaces and implementations to remove RawType generics and streamline usage. Adds Playwright and Stealth download strategies for extensibility.
This commit is contained in:
@@ -6,8 +6,8 @@ using Beam.Models;
|
||||
|
||||
namespace Beam.Fluent;
|
||||
|
||||
internal sealed class TransformStage<RawType, OutType>(DownloadContextBuilder<RawType> CtxBuilder) : ITransformStage<RawType, OutType> where RawType : IDocument {
|
||||
public IContextStage<RawType, OutType> WithTransformer(AsyncTransformer<RawType, OutType> transformer) {
|
||||
return new ContextStage<RawType, OutType>(CtxBuilder, transformer);
|
||||
internal sealed class TransformStage<OutType>(DownloadContextBuilder CtxBuilder) : ITransformStage<OutType> {
|
||||
public IContextStage<OutType> WithTransformer(AsyncTransformer<ByteDocument, OutType> transformer) {
|
||||
return new ContextStage<OutType>(CtxBuilder, transformer);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user