Disposable.Create(Action) method¶
Defined in
Type: Disposable
Namespace: Minimalist.Reactive
Assembly: Minimalist.Reactive.dll
Applies to
netstandard2.0
public static IDisposable Create(Action dispose)
Summary: Creates a disposable object that invokes the specified action when disposed.
Parameters
| Name | Type | Description |
|---|---|---|
dispose | Action | Action to run during the first call to Dispose. The action is guaranteed to be run at most once. |
Returns: IDisposable -- The disposable object that runs the given action upon disposal.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | dispose is null. |