Struct Utils.ScopeGuardObject
An object used to manage scope guards.
Implements
IDisposable
Namespace: IPA.Utilities
Assembly: IPA.Loader.dll
Syntax
public struct ScopeGuardObject
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 |
Implements
IDisposable