Table of Contents

Class LibrarySourceText

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

The words used when a Library source is being added (#792): titles, catalogue details, scope summaries and suggested names, shared by the viewer's Add-to-Library dialog and headless hosts.

public static class LibrarySourceText
Inheritance
LibrarySourceText
Inherited Members

Methods

CatalogUri(LibrarySourceKind, KnownCatalogueSource?)

The online catalogue being read: the known catalogue's, else the kind's default.

public static Uri CatalogUri(LibrarySourceKind kind, KnownCatalogueSource? known)

Parameters

kind LibrarySourceKind

What is being added.

known KnownCatalogueSource

The known catalogue being added, if any.

Returns

Uri

CatalogueDetail(Uri, DateOnly?)

"host · catalogue dated 2026-09-17", or just the host until the catalogue is read.

public static string CatalogueDetail(Uri catalogUri, DateOnly? date)

Parameters

catalogUri Uri

The catalogue's URL.

date DateOnly?

The date the catalogue declares, once read.

Returns

string

Cells(bool, int, long)

"N cells · X MB" (or the "all" form) for a cell selection.

public static string Cells(bool all, int count, long bytes)

Parameters

all bool

True when the selection is the whole catalogue.

count int

The cells selected.

bytes long

Their download size.

Returns

string

DefaultName(string?)

The default collection name for a local path: its file or folder name (a manifest's without its suffix).

public static string DefaultName(string? path)

Parameters

path string

The path, or null.

Returns

string

EverythingCells(int, long)

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

public static string EverythingCells(int count, long bytes)

Parameters

count int

The catalogue's cells.

bytes long

Their download size.

Returns

string

FeedName(LibrarySourceKind, KnownCatalogueSource?)

The default collection name for an online catalogue (not a manifest), or null for a local source.

public static string? FeedName(LibrarySourceKind kind, KnownCatalogueSource? known)

Parameters

kind LibrarySourceKind

What is being added.

known KnownCatalogueSource

The known catalogue being added, if any.

Returns

string

IsStale(DateOnly?, DateTimeOffset)

True when a catalogue is more than a year old (it may no longer be maintained).

public static bool IsStale(DateOnly? date, DateTimeOffset now)

Parameters

date DateOnly?

The date the catalogue declares.

now DateTimeOffset

The current time.

Returns

bool

List(IReadOnlyList<string>)

"A, B, C", or "A, B and 3 more" past three.

public static string? List(IReadOnlyList<string> labels)

Parameters

labels IReadOnlyList<string>

The labels.

Returns

string

NothingDownloads(string)

The summary for a catalogue whose datasets are listed, not downloaded: "… · nothing is downloaded".

public static string NothingDownloads(string selectionSummary)

Parameters

selectionSummary string

What the selection amounts to.

Returns

string

ScopeSummary(bool, int, string)

The summary under the choices: what is included, a reminder that ticks are kept while everything is included, or a prompt to tick something.

public static string ScopeSummary(bool includeAll, int selectedCount, string selectionSummary)

Parameters

includeAll bool

True when the whole catalogue is included.

selectedCount int

How many choices are ticked.

selectionSummary string

What the ticks (or, with none, the whole catalogue) amount to.

Returns

string

SuggestedName(string, bool, Func<string>)

The suggested name that follows the selection: "NOAA ENC — Alaska", or the base name for everything.

public static string SuggestedName(string baseName, bool unscoped, Func<string> describe)

Parameters

baseName string

The feed's name.

unscoped bool

True when everything is included.

describe Func<string>

Describes the selection.

Returns

string

Title(LibrarySourceKind, KnownCatalogueSource?, bool)

The title of an add: the known catalogue's name, else the kind's.

public static string Title(LibrarySourceKind kind, KnownCatalogueSource? known, bool editingManifest = false)

Parameters

kind LibrarySourceKind

What is being added.

known KnownCatalogueSource

The known catalogue being added, if any.

editingManifest bool

True when a manifest source's groups are being chosen again.

Returns

string