ActionDisposable Class
Implements IDisposable by invoking a given Action upon disposal.
public class ActionDisposable : IDisposable- Implements
Constructors
| Name | Description |
|---|---|
| ActionDisposable(Action) | Initializes a new instance of the ActionDisposable class. |
ActionDisposable(Action)
Initializes a new instance of the ActionDisposable class.
public ActionDisposable(Action onDispose)Parameters
onDisposeAction- The
Actionto call upon the first call toActionDisposable.Dispose.
Exceptions
ArgumentNullExceptiononDisposeisnull.
See also
Methods
| Name | Description |
|---|---|
| Dispose() | When invoked for the first time, invokes the Action passed to the constructor. If / when invoked again, this method does nothing. |