Interface IScrapeContext
Represents a job to produce a seed tree that can be traversed to yield usable records or other metadata.
Inherited Members
Namespace: Snowflake.Scraping
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IScrapeContext : IAsyncEnumerable<IEnumerable<ISeed>>
Fields
ClientSeedSource
The default source for a Client-provided seed.
Declaration
public static readonly string ClientSeedSource
Field Value
Type | Description |
---|---|
System. |
Properties
Context
Gets the seed root context local to this job.
Declaration
ISeedRootContext Context { get; }
Property Value
Type | Description |
---|---|
ISeed |
Cullers
Gets the list of ICuller that will be used to cull the resultant seed tree.
Declaration
IEnumerable<ICuller> Cullers { get; }
Property Value
Type | Description |
---|---|
System. |
Scrapers
Gets the list of IScraper that will be used to produce the resultant seed tree.
Declaration
IEnumerable<IScraper> Scrapers { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Cull()
Culls the seed tree with the given Cullers.
Declaration
void Cull()
Cull(IEnumerable<Guid>)
Culls the given seeds before additionally culling the seed tree with the given Cullers
Declaration
void Cull(IEnumerable<Guid> manualCull)
Parameters
Type | Name | Description |
---|---|---|
System. |
manualCull | The seeds to manually cull |
GetAwaiter()
Automatically gets the awaiter for the final, automatically culled, flattened seed tree state.
Use the System.Collections.Generic.IAsyncEnumerable<T> API if you want finer control over the seed tree state, or
directly call the
Declaration
ConfiguredTaskAwaitable<IEnumerable<ISeed>>.ConfiguredTaskAwaiter GetAwaiter()
Returns
Type | Description |
---|---|
System. |
The final, automatically culled, flattened seed tree state. |
Proceed(IEnumerable<SeedContent>, CancellationToken)
Proceed with populating the seed tree using the given Scrapers.
Declaration
ValueTask<bool> Proceed(IEnumerable<SeedContent> seedsToAdd, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
seedsToAdd | Adds seeds to the root of the tree before running scrapers. |
System. |
cancellationToken | The cancellation token used to halt this step. |
Returns
Type | Description |
---|---|
System. |
Whether or not all possible seeds have been added with the given Scrapers |
Proceed(CancellationToken)
Proceed with populating the seed tree using the given Scrapers.
Declaration
ValueTask<bool> Proceed(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
cancellationToken | The cancellation token used to halt this step. |
Returns
Type | Description |
---|---|
System. |
Whether or not all possible seeds have been added with the given Scrapers |