Class LocalManifestIndexer
- Namespace
- EncDotNet.S100.Collections.Indexing
- Assembly
- EncDotNet.S100.Collections.dll
Indexes LocalManifestSources: reads the manifest, then indexes each path of each selected group in place, as a LocalSourceIndexer would.
public sealed class LocalManifestIndexer : ICollectionSourceIndexer
- Inheritance
-
LocalManifestIndexer
- Implements
- Inherited Members
Remarks
Every item is tagged with its group (GroupProperty and GroupNameProperty), and its key is prefixed with the group id and the manifest-relative path it was found under, so keys stay unique when the same folder is listed by more than one group.
Problems never fail the index: an unreadable manifest yields an error diagnostic and no items (with no fingerprint, so the next refresh retries), and a missing path yields a warning.
Constructors
LocalManifestIndexer(LocalSourceIndexer)
Creates an indexer that indexes manifest paths with local.
public LocalManifestIndexer(LocalSourceIndexer local)
Parameters
localLocalSourceIndexer
Fields
GroupNameProperty
The item property holding the display name of the manifest group an item belongs to.
public const string GroupNameProperty = "groupName"
Field Value
GroupProperty
The item property holding the id of the manifest group an item belongs to.
public const string GroupProperty = "group"
Field Value
Methods
CanIndex(CollectionSource)
Returns true when this indexer handles source.
public bool CanIndex(CollectionSource source)
Parameters
sourceCollectionSource
Returns
GetFingerprintAsync(CollectionSource, CancellationToken)
Cheaply computes a fingerprint of the source's current state. When it equals a previous index's Fingerprint, that index is still valid. Returns null when the state cannot be determined (for example the source is unavailable).
public ValueTask<string?> GetFingerprintAsync(CollectionSource source, CancellationToken cancellationToken)
Parameters
sourceCollectionSourcecancellationTokenCancellationToken
Returns
IndexAsync(CollectionSource, IProgress<IndexProgress>?, CancellationToken)
Indexes source.
public ValueTask<SourceIndex> IndexAsync(CollectionSource source, IProgress<IndexProgress>? progress, CancellationToken cancellationToken)
Parameters
sourceCollectionSourceprogressIProgress<IndexProgress>cancellationTokenCancellationToken