IAsyncReasonDisposable

Ecng.Common

Interface for async disposable objects that can be disposed with a reason.

Implements: IAsyncDisposable

Properties

Reason
public string Reason { get; }
value = iAsyncReasonDisposable.Reason

The reason for disposal.

Methods

DisposeAsync
public ValueTask<bool> DisposeAsync(string reason)
result = iAsyncReasonDisposable.DisposeAsync(reason)

Disposes the object asynchronously with a reason.

reason
The reason for disposal.

Returns: true if the object was successfully disposed; otherwise, false.