C
C#5mo ago
TOKYODRIFT!

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);
}
/// <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);
}
2 Replies
TOKYODRIFT!
TOKYODRIFT!5mo ago
also why property has modifier?
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts