Table of Contents

Class CollectionIndexer

Namespace
EncDotNet.S100.Collections.Indexing
Assembly
EncDotNet.S100.Collections.dll

Indexes any supported CollectionSource by delegating to the first ICollectionSourceIndexer that claims it, reusing a previous index when the source's fingerprint is unchanged.

public sealed class CollectionIndexer
Inheritance
CollectionIndexer
Inherited Members

Constructors

CollectionIndexer(IEnumerable<ICollectionSourceIndexer>)

Creates an indexer over indexers, tried in order.

public CollectionIndexer(IEnumerable<ICollectionSourceIndexer> indexers)

Parameters

indexers IEnumerable<ICollectionSourceIndexer>

Methods

CanIndex(CollectionSource)

Returns true when some indexer handles source.

public bool CanIndex(CollectionSource source)

Parameters

source CollectionSource

Returns

bool

CreateDefault(DatasetProbe?, IEnumerable<ICollectionSourceIndexer>?)

Creates an indexer for the built-in source kinds: folders, exchange sets, collection manifests and S-128 catalogues, plus any online feeds (e.g. NoaaEncFeedIndexer, UsaceIencFeedIndexer).

public static CollectionIndexer CreateDefault(DatasetProbe? probe = null, IEnumerable<ICollectionSourceIndexer>? feeds = null)

Parameters

probe DatasetProbe

Reads metadata from loose dataset files; when null, only loose S-57 cells are recognised (without bounds).

feeds IEnumerable<ICollectionSourceIndexer>

Indexers for online feeds; none when null.

Returns

CollectionIndexer

IndexAsync(CollectionSource, SourceIndex?, IProgress<IndexProgress>?, CancellationToken)

Indexes source, or returns previous unchanged when it was built from the same source state.

public ValueTask<SourceIndex> IndexAsync(CollectionSource source, SourceIndex? previous = null, IProgress<IndexProgress>? progress = null, CancellationToken cancellationToken = default)

Parameters

source CollectionSource

The source to index.

previous SourceIndex

A previously built index of the same source, if any.

progress IProgress<IndexProgress>

Receives progress reports.

cancellationToken CancellationToken

Cancels indexing.

Returns

ValueTask<SourceIndex>

Exceptions

NotSupportedException

No indexer handles source.