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
indexersIEnumerable<ICollectionSourceIndexer>
Methods
CanIndex(CollectionSource)
Returns true when some indexer handles source.
public bool CanIndex(CollectionSource source)
Parameters
sourceCollectionSource
Returns
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
probeDatasetProbeReads metadata from loose dataset files; when null, only loose S-57 cells are recognised (without bounds).
feedsIEnumerable<ICollectionSourceIndexer>Indexers for online feeds; none when null.
Returns
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
sourceCollectionSourceThe source to index.
previousSourceIndexA previously built index of the same source, if any.
progressIProgress<IndexProgress>Receives progress reports.
cancellationTokenCancellationTokenCancels indexing.
Returns
Exceptions
- NotSupportedException
No indexer handles
source.