Table of Contents

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

path string

The manifest's full path.

Properties

AutoName

"IC-ENC", or "IC-ENC — Belgium and Germany" for a selection.

public string AutoName { get; }

Property Value

string

CanBuild

True when the source can be built (by default, once the catalogue is read).

public override bool CanBuild { get; }

Property Value

bool

CurrentFilter

The filter for the ticked groups (all of them when everything is included).

public LocalManifestFilter CurrentFilter { get; }

Property Value

LocalManifestFilter

EverythingSummary

"12,345 cells · 1.2 GB" for the whole catalogue.

public override string EverythingSummary { get; }

Property Value

string

Groups

The choice groups, once the catalogue has been read.

public override IReadOnlyList<LibraryChoiceGroup> Groups { get; }

Property Value

IReadOnlyList<LibraryChoiceGroup>

IsLoaded

True once the catalogue has been read.

public override bool IsLoaded { get; }

Property Value

bool

IsSummaryWarning

True when the summary is a warning: nothing ticked, or missing groups in scope.

public bool IsSummaryWarning { get; }

Property Value

bool

ManifestGroups

Every group of the manifest.

public IReadOnlyList<LibraryChoice> ManifestGroups { get; }

Property Value

IReadOnlyList<LibraryChoice>

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

string

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

IReadOnlyList<string>

Name

The catalogue's own name, when it has one (a manifest's title); otherwise null.

public override string? Name { get; }

Property Value

string

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

IReadOnlyCollection<string>

Problems

One line per problem that makes the manifest unreadable ("line 12 · groups[5].id: …").

public IReadOnlyList<string> Problems { get; }

Property Value

IReadOnlyList<string>

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

string

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

string

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

LibraryChoice

Title

The manifest's title, or its file name without the suffix.

public string Title { get; }

Property Value

string

Methods

Build(Guid, string?)

The manifest source, named name (or AutoName when null).

public override CollectionSource Build(Guid id, string? name)

Parameters

id Guid

The new source's id.

name string

The source's name: a new collection's, so the two read alike.

Returns

CollectionSource

DescribeSelection()

"Belgium", "Belgium and Germany", "Belgium, Germany and 2 more"; null when nothing is ticked.

public override string? DescribeSelection()

Returns

string

JoinNames(IReadOnlyList<string>)

"Belgium", "Belgium and Germany", "Belgium, Germany and 2 more".

public static string JoinNames(IReadOnlyList<string> names)

Parameters

names IReadOnlyList<string>

The group names.

Returns

string

LoadAsync(CancellationToken)

Reads the catalogue and creates its choices.

public override Task<string?> LoadAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancels the read.

Returns

Task<string>

Why the catalogue could not be read, or null when it was.