Struct Utils.ScopeGuardObject
An object used to manage scope guards.
Implements
System.IDisposable
Inherited Members
System.ValueType.ToString()
Namespace: IPA.Utilities
Assembly: IPA.Loader.dll
Syntax
public struct ScopeGuardObject : IDisposable
Examples
using var _ = new Utils.ScopeGuardObject(() => RunOnScopeExit(value));
Constructors
| Improve this Doc View SourceScopeGuardObject(Action)
Creates a new scope guard that will invoke action
when disposed.
Declaration
public ScopeGuardObject(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | the action to run on dispose |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Declaration
void IDisposable.Dispose()
Implements
System.IDisposable