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:
qwsdcvghyu89
2025-11-15 22:51:46 +11:00
parent 647b2b0f37
commit f52aa6123b
34 changed files with 648 additions and 439 deletions
+28
View File
@@ -0,0 +1,28 @@
namespace Beam.Models;
public enum DownloadTarget {
/// <summary>
/// Specifies the target as the object directly returned through accessing the URL (whole page).
/// </summary>
/// <remarks>
/// Default to this mode where possible.
/// </remarks>
URL,
/// <summary>
/// Specifies the target as an object accessible only through the url (element in page).
/// </summary>
/// <remarks>
/// Only use this mode if what is needed
/// cannot be acquired by using <see cref="DownloadTarget.URL"/>
/// </remarks>
InURL,
/// <summary>
/// Specifies the target as an object that may be retrieved through a user-defined operation on the url
/// (e.g. javascript triggered downloads).
/// </summary>
/// <remarks>
/// Only use this mode if what is needed cannot be acquired by either
/// <see cref="URL"/> or <see cref="InURL"/>
/// </remarks>
Complex
}