Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AnonymousDisposable Class

    Namespace: Stride.Core
    Assembly: Stride.Core.dll

    This class allows implementation of System.IDisposable using anonymous functions. The anonymous function will be invoked only on the first call to the Dispose() method.

    System.Object → AnonymousDisposable
    Derived from AnonymousDisposable:

    public sealed class AnonymousDisposable : IDisposable
    Name Description
    Constructors
    AnonymousDisposable(Action)

    Initializes a new instance of the AnonymousDisposable class.

    Methods
    Dispose()
    | Improve this Doc View Source

    Constructors


    AnonymousDisposable(Action)

    Initializes a new instance of the AnonymousDisposable class.

    public AnonymousDisposable(Action onDispose)
    Parameters
    Type Name Description
    System.Action onDispose

    The anonymous function to invoke when this object is disposed.

    | Improve this Doc View Source

    Methods


    Dispose()

    public void Dispose()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation