Class ExchangeSetLoader
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
factoryDatasetPipelineFactory
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
exchangeSetExchangeSetThe exchange set to walk.
progressIProgress<ExchangeSetProgress>Optional progress sink; reports before each dataset is opened.
cancellationTokenCancellationTokenHonored between datasets; mid-dataset cancellation depends on the underlying reader.
Returns
- IAsyncEnumerable<ExchangeSetLoadResult>
One ExchangeSetLoadResult per dataset, in catalogue order.