ערוך

שתף באמצעות


TaskToAsyncResult.End Method

Definition

Overloads

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.

End(IAsyncResult)

Source:
TaskToAsyncResult.cs
Source:
TaskToAsyncResult.cs

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

public:
 static void End(IAsyncResult ^ asyncResult);
public static void End (IAsyncResult asyncResult);
static member End : IAsyncResult -> unit
Public Shared Sub End (asyncResult As IAsyncResult)

Parameters

asyncResult
IAsyncResult

The IAsyncResult for which to wait.

Exceptions

asyncResult is null.

asyncResult was not produced by a call to Begin(Task, AsyncCallback, Object).

Remarks

This will propagate any exception stored in the wrapped Task.

Applies to

End<TResult>(IAsyncResult)

Source:
TaskToAsyncResult.cs
Source:
TaskToAsyncResult.cs

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

public:
generic <typename TResult>
 static TResult End(IAsyncResult ^ asyncResult);
public static TResult End<TResult> (IAsyncResult asyncResult);
static member End : IAsyncResult -> 'Result
Public Shared Function End(Of TResult) (asyncResult As IAsyncResult) As TResult

Type Parameters

TResult

The type of the result produced.

Parameters

asyncResult
IAsyncResult

The IAsyncResult for which to wait.

Returns

TResult

The result of the Task<TResult> wrapped by the IAsyncResult.

Exceptions

asyncResult is null.

asyncResult was not produced by a call to Begin(Task, AsyncCallback, Object).

Remarks

This will propagate any exception stored in the wrapped Task<TResult>.

Applies to