TplExtensions.ApplyResultTo<T> Method (Task, 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, _
tcs As TaskCompletionSource(Of T) _
)
public static void ApplyResultTo<T>(
this Task task,
TaskCompletionSource<T> tcs
)
[ExtensionAttribute]
public:
generic<typename T>
static void ApplyResultTo(
Task^ task,
TaskCompletionSource<T>^ tcs
)
static member ApplyResultTo :
task:Task *
tcs:TaskCompletionSource<'T> -> unit
JScript does not support generic types or methods.
Type Parameters
- T
Parameters
- task
Type: System.Threading.Tasks.Task
- tcs
Type: System.Threading.Tasks.TaskCompletionSource<T>
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Task. 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
- 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.