Skip to main content

Disposable.AnonymousDisposable<T>

A private class in Alta.LifecycleManagement.Runtime, Alta.LifecycleManagement. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Disposable returned by Disposable.CreateWithState: runs an action with a state value the first time it's disposed.

Constructors​

MemberWhat it is
AnonymousDisposable(T state, Action<T> dispose)Creates a Disposable.AnonymousDisposable from state and dispose.

Fields​

3 private and internal fields
MemberWhat it is
private readonly Action<T> disposeThe action to run.
private bool isDisposedWhether it has already run.
private readonly T stateValue passed to the action.

Methods​

MemberWhat it is
void Dispose()Runs the action with the state, only the first time.