OnDisposeActionDisposable(Action) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of an IDisposable object that invokes
onDispose on disposal.
public:
OnDisposeActionDisposable(Action ^ onDispose);
public OnDisposeActionDisposable(Action onDispose);
new Microsoft.VisualStudio.Utilities.OnDisposeActionDisposable : Action -> Microsoft.VisualStudio.Utilities.OnDisposeActionDisposable
Public Sub New (onDispose As Action)
Parameters
- onDispose
- Action
Action to run on dipose
Exceptions
Thrown if onDispose is null.
Remarks
Catching any exceptions thrown by onDispose is left to the caller.