Class CatalogueResolutionDiagnostics
- Namespace
- EncDotNet.S100.Datasets.Pipelines.Diagnostics
- Assembly
- EncDotNet.S100.Datasets.Pipelines.dll
Surfaces a structured warning when the version of a portrayal or feature catalogue resolved for a dataset diverges from the dataset's declared product specification edition.
public static class CatalogueResolutionDiagnostics
- Inheritance
-
CatalogueResolutionDiagnostics
- Inherited Members
Remarks
Per S-100 Edition 5.2.1 Part 2 §6, a catalogue at a higher minor version than the dataset is a backward-compatible read; a lower minor or a different major may indicate the wrong catalogue is wired up. We emit one diagnostic per processor instance per (dataset spec, catalogue ref) pair — repeated calls with the same scope do not re-emit.
Each emit:
- Adds an event named
s100.catalogue.matchto the current Activity when one is in scope. - Increments the
s100.catalogue.match.countcounter, tagged with the spec name, declared edition, catalogue version, catalogue kind, and match kind.
Dataset processors should call this from their constructor — catalogue resolution is a one-shot per processor lifetime, and emitting at construction keeps the per-render hot path free of any telemetry overhead.
Methods
Report(object, SpecRef, CatalogueRef?, string)
Reports the relationship between a dataset's declared spec and the catalogue resolved for it. Intended to be called once per processor instance from the processor's constructor, after the catalogue has been assigned.
public static void Report(object dedupScope, SpecRef datasetSpec, CatalogueRef? catalogueRef, string catalogueKind)
Parameters
dedupScopeobjectAn object whose identity scopes deduplication — typically the processor instance itself. Pass
this. Subsequent calls with the samededupScope,datasetSpec,catalogueRef, andcatalogueKindare no-ops; this safety net guards against accidental double-emit without forcing the caller to manually track state.datasetSpecSpecRefThe dataset's declared product spec.
catalogueRefCatalogueRef?The catalogue's identity, or
nullwhen the catalogue does not self-describe (older bundled assets).catalogueKindstringA short description of which catalogue this is — typically
"portrayal"or"feature".