Class StateSubscription

Namespace
MavNet.Core
Assembly
MavNet.Core.dll

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

rate StateRate

Rate this subscription was registered at.

onDispose Action

Called once on first Dispose().

Properties

IsActive

true until Dispose() is called.

public bool IsActive { get; }

Property Value

bool

Rate

Rate this subscription was created with.

public StateRate Rate { get; }

Property Value

StateRate

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()