Class DisposeCallback
- Namespace
- Prefrontal.Common
- Assembly
- Prefrontal.Core.dll
Represents a disposable object that invokes a callback when disposed.
public sealed record DisposeCallback : IDisposable, IEquatable<DisposeCallback>
- Inheritance
-
DisposeCallback
- Implements
- Inherited Members
- Extension Methods
Constructors
DisposeCallback(Action)
Represents a disposable object that invokes a callback when disposed.
public DisposeCallback(Action OnDispose)
Parameters
OnDisposeActionThe callback to invoke when the object is disposed.
Properties
OnDispose
The callback to invoke when the object is disposed.
public Action OnDispose { get; init; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()