Table of Contents

Class KnownCatalogueSources

Namespace
EncDotNet.S100.Collections.KnownSources
Assembly
EncDotNet.S100.Collections.dll

The curated list of known online chart catalogues (issue #670), maintained in this repository (KnownSources/known-sources.json) and embedded in the library. Entries point at each provider's own catalogue; nothing is derived from other projects' source lists.

public static class KnownCatalogueSources
Inheritance
KnownCatalogueSources
Inherited Members

Fields

CustomRegion

The region user-added catalogues are listed under.

public const string CustomRegion = "Custom"

Field Value

string

SecomRegistryIdPrefix

The prefix of the ids FromRegistry(SecomRegistryService) gives.

public const string SecomRegistryIdPrefix = "msr-"

Field Value

string

SecomRegistryRegion

The region SECOM services from a service registry are listed under (#822).

public const string SecomRegistryRegion = "SECOM service registry"

Field Value

string

Properties

All

The built-in list, in file order.

public static IReadOnlyList<KnownCatalogueSource> All { get; }

Property Value

IReadOnlyList<KnownCatalogueSource>

Methods

Find(string)

Finds a built-in source by Id.

public static KnownCatalogueSource? Find(string id)

Parameters

id string

Returns

KnownCatalogueSource

FromRegistry(SecomRegistryService)

Describes a SECOM service listed in a service registry (#822) as a catalogue: its registered name and organisation, listed under SecomRegistryRegion by product, a provisional registration marked as a pilot.

public static KnownCatalogueSource FromRegistry(SecomRegistryService service)

Parameters

service SecomRegistryService

Returns

KnownCatalogueSource

FromUrl(Uri, KnownCatalogueFormat, string?)

Describes a catalogue the user added by URL (issue #670), with what its format provides: its title (or the host) as the name, the host as the provider, and the region "Custom".

public static KnownCatalogueSource FromUrl(Uri catalogUri, KnownCatalogueFormat format, string? title = null)

Parameters

catalogUri Uri
format KnownCatalogueFormat
title string

Returns

KnownCatalogueSource

Read(Stream)

Reads a known-sources document (the embedded list, or a newer copy). Entries whose format this build does not understand are skipped.

public static IReadOnlyList<KnownCatalogueSource> Read(Stream stream)

Parameters

stream Stream

Returns

IReadOnlyList<KnownCatalogueSource>

Exceptions

JsonException

The document is malformed.

Write(Stream, IEnumerable<KnownCatalogueSource>)

Writes sources as a known-sources document, for example the user's own catalogues; Read(Stream) reads it back.

public static void Write(Stream stream, IEnumerable<KnownCatalogueSource> sources)

Parameters

stream Stream
sources IEnumerable<KnownCatalogueSource>