Table of Contents

Interface IPortrayalCatalogue

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

Members shared by every product portrayal catalogue: the product it portrays, its edition, and the active colour palette. Specialised by IVectorPortrayalCatalogue for feature-based products. The file-backed coverage catalogues (S-102, S-111) implement it alongside ICoverageStyle, which code-defined coverage styles implement on their own.

public interface IPortrayalCatalogue

Remarks

A catalogue instance is stateful (active palette, and for vector catalogues the viewing-group, display-mode and display-plane controllers) and is not intended for concurrent mutation.

Properties

ActivePalette

The currently active colour palette.

ColorPalette ActivePalette { get; }

Property Value

ColorPalette

Remarks

Implementations start at the empty Default until the first SwitchPaletteAsync(PaletteType, CancellationToken) call loads the catalogue's colour profile; never null.

Edition

The edition of the underlying portrayal catalogue (matches PortrayalCatalogue.Version).

string Edition { get; }

Property Value

string

Spec

The product specification (name + edition) this catalogue targets.

SpecRef Spec { get; }

Property Value

SpecRef

Methods

SwitchPaletteAsync(PaletteType, CancellationToken)

Switches the active colour palette to type.

ValueTask SwitchPaletteAsync(PaletteType type, CancellationToken cancellationToken = default)

Parameters

type PaletteType

The palette mood (Day, Dusk, or Night).

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask

Remarks

Asynchronous because catalogues that load palettes lazily from IAssetSource may need to fetch the colour profile XML on first access. Cached implementations complete synchronously through the ValueTask fast path. When the catalogue has no palette for type, implementations keep a usable palette active (the current one, or Day) rather than failing. Coverage catalogues also use this call to pre-load the assets their synchronous resolve methods need, so it must be awaited before those are called (see SwitchPaletteAsync(PaletteType, CancellationToken)).