Interface IDatasetCatalog
Read-only view onto the set of datasets currently loaded by a host (e.g. a viewer, CLI, or headless service).
public interface IDatasetCatalog
Remarks
The catalog exposes state as a property — Datasets — rather than as a method, because "what is loaded right now" reads more naturally as state than as an operation. Implementations must publish a fresh IReadOnlyList<T> on every change so that consumers can capture the reference once and use it for the duration of a single tool invocation without taking any lock.
Coverage payloads (S-102, S-104, S-111) carry live handles whose lifetime is owned by the host, not the catalog. Tools must therefore treat coverage reads as best-effort: a dataset may be unloaded between the catalog snapshot and the actual read. Tool implementations catch ObjectDisposedException and surface DatasetClosedDuringQuery.
Properties
Datasets
Atomic, immutable snapshot of all datasets currently loaded. Implementations publish a fresh array on every change; consumers may capture the reference for the duration of an operation without locking.
IReadOnlyList<LoadedDataset> Datasets { get; }
Property Value
Events
Changed
Raised after Datasets has been updated. The event reports what changed; consumers needing the new state read Datasets directly.
event EventHandler<DatasetCatalogChangedEventArgs>? Changed