public readonly bool IsActiveGets a value indicating whether this guard is still active and will run on disposal.
All Types / Ferrous.Guard
public ref struct ScopeGuard<TState> : IDisposable
A stack-allocated scope guard carrying explicit TState to avoid closure allocations.
TStatepublic readonly bool IsActiveGets a value indicating whether this guard is still active and will run on disposal.
public void Dismiss()Disarms the guard so that disposing it becomes a no-op.
public void Dispose()Executes the deferred callback with the captured state if the guard has not been dismissed or already disposed.