AsyncDisposable

Ecng.Common

Provides a base class for implementing the async dispose pattern. This class helps manage the disposal of managed and native resources asynchronously.

Наследует: DisposableBase

Реализует: IAsyncReasonDisposable, IAsyncDisposable, IDisposable

Методы

Dispose
public void Dispose()
asyncDisposable.Dispose()

Performs tasks associated with freeing, releasing, or resetting unmanaged resources synchronously.

DisposeAsync
public ValueTask DisposeAsync()
result = asyncDisposable.DisposeAsync()

Performs tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

DisposeManaged
protected virtual ValueTask DisposeManaged()
result = asyncDisposable.DisposeManaged()

Disposes the managed resources asynchronously. Override this method to add custom clean up of managed resources.