Table of Contents

Class Specification

Namespace
EncDotNet.S100.Specifications
Assembly
EncDotNet.S100.Specifications.dll

Provides access to bundled S-100 specification assets (Feature Catalogues and Portrayal Catalogues).

public static class Specification
Inheritance
Specification
Inherited Members

Properties

AvailableSpecRefs

Strongly-typed view of AvailableSpecs. Each entry has its canonical name (e.g. "S-101") and a default SpecVersion of 0.0.0, signaling "edition unspecified" — no per-bundle manifest currently records which spec edition the bundled assets target. To determine the actual catalogue version, parse the bundled Feature or Portrayal Catalogue and inspect its CatalogueRef.

public static IReadOnlyList<SpecRef> AvailableSpecRefs { get; }

Property Value

IReadOnlyList<SpecRef>

AvailableSpecs

Product specifications that have bundled assets in this assembly.

public static IReadOnlyList<string> AvailableSpecs { get; }

Property Value

IReadOnlyList<string>

Methods

CreateFeatureCatalogueSource(string)

Creates an IAssetSource rooted at the bundled Feature Catalogue directory for the given product specification. The source is wrapped in a CachingAssetSource so repeated reads of FeatureCatalogue.xml are served from memory after the first read.

public static IAssetSource CreateFeatureCatalogueSource(string productSpec)

Parameters

productSpec string

The product specification identifier (e.g. "S-101", "S-102").

Returns

IAssetSource

An asset source for the bundled Feature Catalogue contents.

Remarks

This parallels CreatePortrayalCatalogueSource(string) and lets callers register the bundled FC with FeatureCatalogueManager.SetSource so the parse cache can be preceded by an asset-bytes cache. See S-100 Edition 5.2.1 Part 4 §6 for the Feature Catalogue model.

CreatePortrayalCatalogueSource(string)

Creates an IAssetSource rooted at the bundled Portrayal Catalogue directory for the given product specification.

public static IAssetSource CreatePortrayalCatalogueSource(string productSpec)

Parameters

productSpec string

The product specification identifier (e.g. "S-101", "S-102", "S-111").

Returns

IAssetSource

An asset source for the Portrayal Catalogue contents.

HasFeatureCatalogue(string)

Returns true if a bundled Feature Catalogue exists for the given product specification.

public static bool HasFeatureCatalogue(string productSpec)

Parameters

productSpec string

Returns

bool

HasPortrayalCatalogue(string)

Returns true if a bundled Portrayal Catalogue exists for the given product specification.

public static bool HasPortrayalCatalogue(string productSpec)

Parameters

productSpec string

Returns

bool

OpenFeatureCatalogueAsync(string, CancellationToken)

Opens the bundled Feature Catalogue XML for the given product specification as a readable stream.

public static Task<Stream> OpenFeatureCatalogueAsync(string productSpec, CancellationToken cancellationToken = default)

Parameters

productSpec string

The product specification identifier (e.g. "S-101", "S-102", "S-104", "S-111").

cancellationToken CancellationToken

A cancellation token.

Returns

Task<Stream>

A stream containing the Feature Catalogue XML.

TryOpenFeatureCatalogue(string)

public static Stream? TryOpenFeatureCatalogue(string productSpec)

Parameters

productSpec string

Returns

Stream

Remarks

SYNC BRIDGE: bundled FC streams come from EmbeddedAssetSource, which is backed by an in-process resource read and therefore has no real async work. This sync facade lets the many sync callers (validator constructors, viewer init paths, listed-value indexes) open the catalogue without each chasing async-up-the-stack.

TryOpenFeatureCatalogueAsync(string, CancellationToken)

Tries to open the bundled Feature Catalogue XML for the given product specification. Returns null if no bundled catalogue is available.

public static Task<Stream?> TryOpenFeatureCatalogueAsync(string productSpec, CancellationToken cancellationToken = default)

Parameters

productSpec string

The product specification identifier (e.g. "S-101", "S-102", "S-104", "S-111").

cancellationToken CancellationToken

A cancellation token.

Returns

Task<Stream>

A stream containing the Feature Catalogue XML, or null if not found.