Table of Contents

Class AnonymousDisposable

Namespace
Stride.Core
Assembly
Stride.Core.dll

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

public sealed class AnonymousDisposable : IDisposable
Inheritance
AnonymousDisposable
Implements
Extension Methods

Constructors

AnonymousDisposable(Action)

Initializes a new instance of the AnonymousDisposable class.

public AnonymousDisposable(Action onDispose)

Parameters

onDispose Action

The anonymous function to invoke when this object is disposed.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()