'Declaration
<JetBrains.Annotations.AssertionMethodAttribute()> Protected Overloads Sub DisposeGuard( _ ByVal action As Action, _ ByVal throwOnDisposed As Boolean _ )
'Usage
Dim instance As DisposableObject Dim action As Action Dim throwOnDisposed As Boolean instance.DisposeGuard(action, throwOnDisposed)
[JetBrains.Annotations.AssertionMethod()] protected void DisposeGuard( Action action, bool throwOnDisposed )
[JetBrains.Annotations.AssertionMethod()] protected: void DisposeGuard( Action^ action, bool throwOnDisposed )
Parameters
- action
- The action to be invoked.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - throwOnDisposed
- Whether to throw an exception when the object is disposed.