Disposable

Namespace: SnowBank.Reactive.Disposables · class

Helper type that can create IDisposable wrappers

Methods

Create

static IDisposable Create(Action action)

Creates an IDisposable instance that invokes a custom callback when it is disposed

static IDisposable<T> Create<T>(T value, Action<T> action)

Creates an IDisposable instance that wraps a value, and invokes a custom callback when it is disposed

static IDisposable<T> Create<T>(T value, Action<T, object> action, object state)

Creates an IDisposable instance that wraps a value, and invokes a custom callback when it is disposed

Empty

static IDisposable Empty()

Returns a "dummy" IDisposable instance that does nothing when it is disposed