Table of Contents

Class AsyncDisposable

Namespace
Cuemon.Extensions
Assembly
Cuemon.Extensions.Core.dll

Provides a mechanism for asynchronously releasing both managed and unmanaged resources with focus on the former.

public abstract class AsyncDisposable : Disposable, IDisposable, IAsyncDisposable
Inheritance
AsyncDisposable
Implements
Inherited Members
Extension Methods

Methods

DisposeAsync()

Asynchronously releases the resources used by the AsyncDisposable.

public async ValueTask DisposeAsync()

Returns

ValueTask

A ValueTask that represents the asynchronous dispose operation.

Remarks

OnDisposeManagedResources()

Called when this object is being disposed by either Dispose() or Dispose(Boolean) having disposing set to true and Disposed is false.

protected override void OnDisposeManagedResources()

Remarks

You should almost never override this - unless you want to call it from OnDisposeManagedResourcesAsync().

OnDisposeManagedResourcesAsync()

Called when this object is being disposed by DisposeAsync().

protected abstract ValueTask OnDisposeManagedResourcesAsync()

Returns

ValueTask

See Also