• Home
  • Blog
  • Docs
  • GitHub
Show / Hide Table of Contents

Interface IScrapeContext

Represents a job to produce a seed tree that can be traversed to yield usable records or other metadata.

Inherited Members
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IEnumerable<Snowflake.Scraping.ISeed>>.GetAsyncEnumerator(System.Threading.CancellationToken)
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.String

Properties

Context

Gets the seed root context local to this job.

Declaration
ISeedRootContext Context { get; }
Property Value
Type Description
ISeedRootContext

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.Collections.Generic.IEnumerable<ICuller>

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.Collections.Generic.IEnumerable<IScraper>

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.Collections.Generic.IEnumerable<System.Guid> 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 methods for even finer control over the tree state.

Declaration
ConfiguredTaskAwaitable<IEnumerable<ISeed>>.ConfiguredTaskAwaiter GetAwaiter()
Returns
Type Description
System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter<>

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.Collections.Generic.IEnumerable<SeedContent> seedsToAdd

Adds seeds to the root of the tree before running scrapers.

System.Threading.CancellationToken cancellationToken

The cancellation token used to halt this step.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.Boolean>

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.Threading.CancellationToken cancellationToken

The cancellation token used to halt this step.

Returns
Type Description
System.Threading.Tasks.ValueTask<System.Boolean>

Whether or not all possible seeds have been added with the given Scrapers

Built with ❤️ by @chyyran. Text content licensed under CC-BY-SA 4.0.