다음을 통해 공유


VsInvokableAsyncFunction<T> Delegate

Used by the asynchronous task library helper to take an IVsTaskCompletionSource and return a Task Parallel Library (TPL) task.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Delegate Function VsInvokableAsyncFunction(Of T) ( _
    tcs As IVsTaskCompletionSource _
) As Task(Of T)
public delegate Task<T> VsInvokableAsyncFunction<T>(
    IVsTaskCompletionSource tcs
)
generic<typename T>
public delegate Task<T>^ VsInvokableAsyncFunction(
    IVsTaskCompletionSource^ tcs
)
type VsInvokableAsyncFunction = 
    delegate of  
        tcs:IVsTaskCompletionSource -> Task<'T>
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of the result produced by this task.

Parameters

Return Value

Type: Task<T>

Remarks

This delegate converts a returning System.Threading.Tasks.Task function to return an IVsTask instead. The delegate is provided by the caller and is used to return the System.Threading.Tasks.Task instance that would be converted to IVsTask.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace