Class StateSubscription
Handle to a single state-change subscription. Dispose to unsubscribe — there is no
matching -= form. Implements IDisposable so it composes cleanly
with using/using var and the Blazor IDisposable page pattern.
Disposal is idempotent and thread-safe.
public sealed class StateSubscription : IDisposable
- Inheritance
-
StateSubscription
- Implements
- Inherited Members
Constructors
StateSubscription(StateRate, Action)
Creates a subscription with the given rate and disposal callback.
public StateSubscription(StateRate rate, Action onDispose)
Parameters
rateStateRateRate this subscription was registered at.
onDisposeActionCalled once on first Dispose().
Properties
IsActive
true until Dispose() is called.
public bool IsActive { get; }
Property Value
Rate
Rate this subscription was created with.
public StateRate Rate { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()