Search Results for

    Show / Hide Table of Contents

    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 Source

    ScopeGuardObject(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 Source

    IDisposable.Dispose()

    Declaration
    void IDisposable.Dispose()

    Implements

    System.IDisposable

    Extension Methods

    ReflectionUtil.SetField<T, U>(T, String, U)
    ReflectionUtil.GetField<U, T>(T, String)
    ReflectionUtil.SetProperty<T, U>(T, String, U)
    ReflectionUtil.GetProperty<U, T>(T, String)
    ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])

    See Also

    ScopeGuard(Action)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX