Interface IDynamicFeatureSource
- Namespace
- EncDotNet.S100.DynamicSources
- Assembly
- EncDotNet.S100.Core.dll
A push-driven publisher of one or more dynamic features. Sources
are graphics-agnostic and may be implemented by any consumer of
EncDotNet.S100.Core — there is no dependency on Mapsui,
Avalonia, or any specific rendering surface.
public interface IDynamicFeatureSource
Remarks
Sources publish a current snapshot via
CurrentFeatures and a change-event via
Changed. The viewer-side glue subscribes, captures
the snapshot, marshals to the UI thread, and replays the
snapshot through a registered IDynamicFeatureRenderer
resolved from DI by RendererKey.
Threading. Changed may be raised on any thread. CurrentFeatures and Metadata must be safe to read from any thread; sources typically implement this via an immutable snapshot swap or a lock.
See docs/design/dynamic-feature-source.md for the full
design rationale.
Properties
CurrentFeatures
Most recent snapshot of features known to the source. Safe to read from any thread; the returned collection is treated as immutable by consumers.
IReadOnlyList<DynamicFeature> CurrentFeatures { get; }
Property Value
Id
Instance-unique identifier — distinguishes this source from other sources of the same kind in the same host (e.g. two AIS feeds for different ports). Stability across the lifetime of the source is a hard contract.
string Id { get; }
Property Value
Metadata
Display metadata and renderer-resolution hints. Immutable for the lifetime of the source.
DynamicSourceMetadata Metadata { get; }
Property Value
Events
Changed
Raised when CurrentFeatures changes. May be raised on any thread. The viewer-side overlay host marshals to the UI thread before mutating Mapsui state.
event EventHandler<DynamicFeaturesChanged>? Changed