Op Englesch liesen Editéieren

Deelen iwwer


TaskToAsyncResult Class

Definition

Provides methods for using Task to implement the Asynchronous Programming Model pattern based on "Begin" and "End" methods.

C#
public static class TaskToAsyncResult
Inheritance
TaskToAsyncResult

Methods

Begin(Task, AsyncCallback, Object)

Creates a new IAsyncResult from the specified Task, optionally invoking callback when the task has completed.

End(IAsyncResult)

Waits for the Task wrapped by the IAsyncResult returned by Begin(Task, AsyncCallback, Object) to complete.

End<TResult>(IAsyncResult)

Waits for the Task<TResult> wrapped by the IAsyncResult returned by Begin(Task, AsyncCallback, Object) to complete.

Unwrap(IAsyncResult)

Extracts the underlying Task from an IAsyncResult created by Begin(Task, AsyncCallback, Object).

Unwrap<TResult>(IAsyncResult)

Extracts the underlying Task<TResult> from an IAsyncResult created by Begin(Task, AsyncCallback, Object).

Applies to

Produkt Versiounen
.NET 8, 9, 10