Table of Contents

Struct CatalogueRef

Namespace
EncDotNet.S100.Core
Assembly
EncDotNet.S100.Core.dll

Identity of a single Feature Catalogue or Portrayal Catalogue instance — the pair (name, version) declared inside the catalogue's metadata (<S100FC:productId> + <S100FC:versionNumber> for FCs; equivalent fields for PCs).

public readonly record struct CatalogueRef : IEquatable<CatalogueRef>
Implements
Inherited Members

Remarks

CatalogueRef is intentionally distinct from SpecRef even though both carry a name and a version: a catalogue's version advances on a different release cadence from its owning product specification edition. For example, S-101 product spec edition 1.2.0 currently ships with a Feature Catalogue at version 2.0.0.

Used as the cache key inside FC and PC managers so that two distinct catalogue versions can coexist in a single process — something a bare product-name string cannot express.

Constructors

CatalogueRef(string, SpecVersion)

Creates a new CatalogueRef. name is normalised to "S-NNN" form; FormatException is thrown if it is not a recognised S-100 product spec name.

public CatalogueRef(string name, SpecVersion version)

Parameters

name string
version SpecVersion

Properties

Name

The catalogue's owning product specification short name in canonical "S-NNN" form (e.g. "S-101").

public string Name { get; }

Property Value

string

Version

The catalogue version (independent of any product spec edition).

public SpecVersion Version { get; }

Property Value

SpecVersion

Methods

Parse(string)

Parses a CatalogueRef from "S-101@2.0.0" or "S-101/2.0.0" form.

public static CatalogueRef Parse(string s)

Parameters

s string

Returns

CatalogueRef

Exceptions

FormatException

The input does not match any recognised form.

ToString()

Returns the canonical "S-NNN@M.m.c" form.

public override string ToString()

Returns

string

Remarks

The @ separator is chosen deliberately to distinguish a CatalogueRef string from a SpecRef string, which uses / (see ToString()). Keeping the two forms visually distinct makes log lines and diagnostics unambiguous even though both Parse(string) methods tolerate either separator on input. Do not align these separators without also updating the "distinguish from SpecRef" round-trip tests.

TryParse(string?, out CatalogueRef)

Tolerant variant of Parse(string) returning false on failure.

public static bool TryParse(string? s, out CatalogueRef value)

Parameters

s string
value CatalogueRef

Returns

bool