Class InteroperabilityAuthorityProvider
- Namespace
- EncDotNet.S100.Datasets.Pipelines.Interoperability
- Assembly
- EncDotNet.S100.Core.dll
Mutable default IInteroperabilityAuthorityProvider: holds a single IInteroperabilityAuthority reference that the host can swap at runtime (e.g. via a settings binding). The initial authority is required at construction time — hosts inject the chosen policy via DI; there is no static fallback.
public sealed class InteroperabilityAuthorityProvider : IInteroperabilityAuthorityProvider
- Inheritance
-
InteroperabilityAuthorityProvider
- Implements
- Inherited Members
Remarks
Not thread-safe — callers are expected to swap on the UI thread. The setter raises CurrentChanged after the swap completes, on the calling thread, even when the new authority is reference-equal to the previous one (which lets a host force a re-sort cycle, e.g. after a downstream catalogue reload that changed the authority's internal table).
Constructors
InteroperabilityAuthorityProvider(IInteroperabilityAuthority)
Initialises a provider holding initial.
Required — there is no default fallback; hosts wire the
initial authority via DI.
public InteroperabilityAuthorityProvider(IInteroperabilityAuthority initial)
Parameters
initialIInteroperabilityAuthority
Properties
Current
The authority every consumer should consult on each
operation. Never null.
public IInteroperabilityAuthority Current { get; }
Property Value
Methods
Set(IInteroperabilityAuthority)
Swaps the active authority and raises
CurrentChanged. Throws ArgumentNullException
when authority is null — the provider's
Current must never be null.
public void Set(IInteroperabilityAuthority authority)
Parameters
authorityIInteroperabilityAuthority
Events
CurrentChanged
Raised after Current has been swapped to a different instance. Consumers re-sort their layer stack (and re-broadcast their derived state — pick ordering, layer-controls UI labels, etc.) in response.
public event Action? CurrentChanged
Event Type
Remarks
The event is raised synchronously on the thread that swapped the authority. Implementations are expected to swap on the UI thread; consumers running off-thread must marshal.