Table of Contents

Class ExchangeSetLoader

Namespace
EncDotNet.S100.Datasets.Pipelines
Assembly
EncDotNet.S100.Datasets.Pipelines.dll

Bulk-loads every dataset declared in an ExchangeSet's catalogue, routing each one through DatasetPipelineFactory. Errors are captured per-dataset rather than thrown so a single bad dataset does not abort the load.

public sealed class ExchangeSetLoader
Inheritance
ExchangeSetLoader
Inherited Members

Remarks

The loader does not own the supplied ExchangeSet; the caller is responsible for keeping it alive (and its underlying IAssetSource) for as long as any returned processor is in use, then disposing it.

Constructors

ExchangeSetLoader(DatasetPipelineFactory)

Initializes a new ExchangeSetLoader that delegates per-dataset processor construction to factory.

public ExchangeSetLoader(DatasetPipelineFactory factory)

Parameters

factory DatasetPipelineFactory

Methods

LoadAllAsync(ExchangeSet, IProgress<ExchangeSetProgress>?, CancellationToken)

Asynchronously loads every dataset declared by exchangeSet's catalogue.

public IAsyncEnumerable<ExchangeSetLoadResult> LoadAllAsync(ExchangeSet exchangeSet, IProgress<ExchangeSetProgress>? progress = null, CancellationToken cancellationToken = default)

Parameters

exchangeSet ExchangeSet

The exchange set to walk.

progress IProgress<ExchangeSetProgress>

Optional progress sink; reports before each dataset is opened.

cancellationToken CancellationToken

Honored between datasets; mid-dataset cancellation depends on the underlying reader.

Returns

IAsyncEnumerable<ExchangeSetLoadResult>

One ExchangeSetLoadResult per dataset, in catalogue order.