AnonymousDisposable Class
Namespace: Stride.CoreAssembly: 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() |
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. |
Methods
Dispose()
public void Dispose()