Class Disposable
Provides a set of static methods for creating Disposables.
Inherited Members
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.Core.dll
Syntax
public static class Disposable
Properties
| Improve this Doc View SourceEmpty
Gets the disposable that does nothing when disposed.
Declaration
public static IDisposable Empty { get; }
Property Value
Type | Description |
---|---|
IDisposable |
Methods
| Improve this Doc View SourceCreate(Action)
Creates a disposable object that invokes the specified action when disposed.
Declaration
public static IDisposable Create(Action dispose)
Parameters
Type | Name | Description |
---|---|---|
Action | dispose | Action to run during the first call to Dispose(). The action is guaranteed to be run at most once. |
Returns
Type | Description |
---|---|
IDisposable | The disposable object that runs the given action upon disposal. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|