Class CollectionManifestScope
- Namespace
- EncDotNet.S100.Collections.Library
- Assembly
- EncDotNet.S100.Collections.dll
A scope of a local collection manifest (*.s100collection.json): by
group. A manifest that cannot be read reports every problem in it
(Problems) rather than a single error.
public sealed class CollectionManifestScope : LibraryCatalogueScope
- Inheritance
-
CollectionManifestScope
- Inherited Members
Constructors
CollectionManifestScope(string)
Creates a scope of the manifest at path.
public CollectionManifestScope(string path)
Parameters
pathstringThe manifest's full path.
Properties
AutoName
"IC-ENC", or "IC-ENC — Belgium and Germany" for a selection.
public string AutoName { get; }
Property Value
CanBuild
True when the source can be built (by default, once the catalogue is read).
public override bool CanBuild { get; }
Property Value
CurrentFilter
The filter for the ticked groups (all of them when everything is included).
public LocalManifestFilter CurrentFilter { get; }
Property Value
EverythingSummary
"12,345 cells · 1.2 GB" for the whole catalogue.
public override string EverythingSummary { get; }
Property Value
Groups
The choice groups, once the catalogue has been read.
public override IReadOnlyList<LibraryChoiceGroup> Groups { get; }
Property Value
IsLoaded
True once the catalogue has been read.
public override bool IsLoaded { get; }
Property Value
IsSummaryWarning
True when the summary is a warning: nothing ticked, or missing groups in scope.
public bool IsSummaryWarning { get; }
Property Value
ManifestGroups
Every group of the manifest.
public IReadOnlyList<LibraryChoice> ManifestGroups { get; }
Property Value
ManifestPath
The manifest's path; changing it means reading another manifest (picks whose ids still exist are kept).
public string ManifestPath { get; set; }
Property Value
MissingInScope
Names of the groups that matter and are missing on disk: the ticked ones, or all of them for everything.
public IReadOnlyList<string> MissingInScope { get; }
Property Value
Name
The catalogue's own name, when it has one (a manifest's title); otherwise null.
public override string? Name { get; }
Property Value
PendingPicks
Group ids to tick when the manifest is next read, in place of the current ticks (editing a source's groups).
public IReadOnlyCollection<string>? PendingPicks { get; set; }
Property Value
Problems
One line per problem that makes the manifest unreadable ("line 12 · groups[5].id: …").
public IReadOnlyList<string> Problems { get; }
Property Value
ScopeSummary
The summary under the choices: what is included, that ticks are kept, or a prompt to tick something.
public override string ScopeSummary { get; }
Property Value
SelectionSummary
What the ticked choices (or, with none, the whole catalogue) amount to, e.g. "12 cells · 3 MB".
public override string SelectionSummary { get; }
Property Value
SingleEntry
The catalogue's only download, when it lists just one (there is nothing to choose); otherwise null.
public override LibraryChoice? SingleEntry { get; }
Property Value
Title
The manifest's title, or its file name without the suffix.
public string Title { get; }
Property Value
Methods
Build(Guid, string?)
The manifest source, named name (or AutoName when null).
public override CollectionSource Build(Guid id, string? name)
Parameters
idGuidThe new source's id.
namestringThe source's name: a new collection's, so the two read alike.
Returns
DescribeSelection()
"Belgium", "Belgium and Germany", "Belgium, Germany and 2 more"; null when nothing is ticked.
public override string? DescribeSelection()
Returns
JoinNames(IReadOnlyList<string>)
"Belgium", "Belgium and Germany", "Belgium, Germany and 2 more".
public static string JoinNames(IReadOnlyList<string> names)
Parameters
namesIReadOnlyList<string>The group names.
Returns
LoadAsync(CancellationToken)
Reads the catalogue and creates its choices.
public override Task<string?> LoadAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancels the read.