Table of Contents

Class CommunityListScope

Namespace
EncDotNet.S100.Collections.Library
Assembly
EncDotNet.S100.Collections.dll

A scope of a community chart list (chartcatalogs format; issue #670): by entry.

public sealed class CommunityListScope : LibraryCatalogueScope
Inheritance
CommunityListScope
Inherited Members

Constructors

CommunityListScope(Uri, Func<Uri, CancellationToken, Task<ChartCatalogsProductCatalog>>)

Creates a scope of the list at catalogUri.

public CommunityListScope(Uri catalogUri, Func<Uri, CancellationToken, Task<ChartCatalogsProductCatalog>> load)

Parameters

catalogUri Uri

The list's URL.

load Func<Uri, CancellationToken, Task<ChartCatalogsProductCatalog>>

Reads the list.

Properties

Charts

Every entry of the list.

public IReadOnlyList<LibraryChoice> Charts { get; }

Property Value

IReadOnlyList<LibraryChoice>

CurrentFilter

The filter for the ticked entries.

public ChartCatalogsFilter CurrentFilter { get; }

Property Value

ChartCatalogsFilter

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

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

Methods

Build(Guid, string?)

The source the scope describes.

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

Parameters

id Guid

The new source's id.

name string

The source's name when everything is included (the catalogue's name); a selection names it after the selection. A manifest source always takes it.

Returns

CollectionSource

DescribeSelection()

Describes the ticked choices ("Alaska, Hawaii"), or null when nothing is ticked.

public override string? DescribeSelection()

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.