Struct Utils.ScopeGuardObject
An object used to manage scope guards.
Implements
System.IDisposable
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
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 |
---|---|---|
System.Action | action | the action to run on dispose |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Declaration
void IDisposable.Dispose()
Implements
System.IDisposable