TplExtensions.FollowCancelableTaskToCompletion<T> Method
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Shared Function FollowCancelableTaskToCompletion(Of T) ( _
taskToFollow As Func(Of Task(Of T)), _
ultimateCancellation As CancellationToken, _
taskThatFollows As TaskCompletionSource(Of T) _
) As Task(Of T)
public static Task<T> FollowCancelableTaskToCompletion<T>(
Func<Task<T>> taskToFollow,
CancellationToken ultimateCancellation,
TaskCompletionSource<T> taskThatFollows
)
public:
generic<typename T>
static Task<T>^ FollowCancelableTaskToCompletion(
Func<Task<T>^>^ taskToFollow,
CancellationToken ultimateCancellation,
TaskCompletionSource<T>^ taskThatFollows
)
static member FollowCancelableTaskToCompletion :
taskToFollow:Func<Task<'T>> *
ultimateCancellation:CancellationToken *
taskThatFollows:TaskCompletionSource<'T> -> Task<'T>
JScript does not support generic types or methods.
Type Parameters
- T
Parameters
- taskToFollow
Type: System.Func<Task<T>>
- ultimateCancellation
Type: System.Threading.CancellationToken
- taskThatFollows
Type: System.Threading.Tasks.TaskCompletionSource<T>
Return Value
Type: System.Threading.Tasks.Task<T>
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.