Skip to main content

Disposable

A static class in Alta.LifecycleManagement.Runtime, Alta.LifecycleManagement.

Helpers for making IDisposable objects from actions.

Fields​

MemberWhat it is
static readonly IDisposable EmptyA disposable that does nothing.

Methods​

MemberWhat it is
static IDisposable Create(Action disposeAction)Returns a disposable that runs the action once when disposed.
static IDisposable CreateWithState<TState>(TState state, Action<TState> disposeAction)Returns a disposable that runs the action with the given state once when disposed.