Compartir a través de


TplExtensions.ApplyResultTo<T> Method (Task<T>, TaskCompletionSource<T>)

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub ApplyResultTo(Of T) ( _
    task As Task(Of T), _
    tcs As TaskCompletionSource(Of T) _
)
public static void ApplyResultTo<T>(
    this Task<T> task,
    TaskCompletionSource<T> tcs
)
[ExtensionAttribute]
public:
generic<typename T>
static void ApplyResultTo(
    Task<T>^ task, 
    TaskCompletionSource<T>^ tcs
)
static member ApplyResultTo : 
        task:Task<'T> * 
        tcs:TaskCompletionSource<'T> -> unit
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

TplExtensions Class

ApplyResultTo Overload

Microsoft.VisualStudio.Threading Namespace