C#C
C#2y ago
SWEETPONY

why do we need IAsyncDisposable here?

I found this and I don't understand why author use IAsyncDisposable instead of IDisposable. Can someone help me to understand?
/// <summary>
///     The context in which the WebAuthn operation is being processed.
/// </summary>
public interface IWebAuthnContext : IAsyncDisposable
{
    /// <summary>
    ///     The context of the HTTP request in which the WebAuthn operation is being processed.
    /// </summary>
    public HttpContext HttpContext { get; }

    /// <summary>
    ///     Save the changes made in this context.
    /// </summary>
    /// <param name="cancellationToken">Cancellation token for an asynchronous operation.</param>
    Task CommitAsync(CancellationToken cancellationToken);
}
Was this page helpful?