Udostępnij za pośrednictwem


TaskExtensions.HandleCancellation<TResult> Method

Definition

public static System.Threading.Tasks.Task<TResult> HandleCancellation<TResult> (this System.Threading.Tasks.Task<TResult> asyncTask, System.Threading.CancellationToken cancellationToken);
static member HandleCancellation : System.Threading.Tasks.Task<'Result> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
<Extension()>
Public Function HandleCancellation(Of TResult) (asyncTask As Task(Of TResult), cancellationToken As CancellationToken) As Task(Of TResult)

Type Parameters

TResult

Parameters

asyncTask
Task<TResult>
cancellationToken
CancellationToken

Returns

Task<TResult>

Applies to