VsTaskLibraryHelper::InvokeAsync<T> Method (IVsTaskSchedulerService^, VsInvokableAsyncFunction<T>^)
Visual Studio 2015
Transforms a task parallel library (TPL) task from an asynchronous function into an IVsTask.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
public: generic<typename T> [ExtensionAttribute] static IVsTask^ InvokeAsync( IVsTaskSchedulerService^ scheduler, VsInvokableAsyncFunction<T>^ asyncFunction )
Parameters
- scheduler
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsTaskSchedulerService^
The task scheduler used to create the IVsTaskCompletionSource.
- asyncFunction
-
Type:
Microsoft.VisualStudio.Shell::VsInvokableAsyncFunction<T>^
The asynchronous function that takes an IVsTaskCompletionSource and returns a TPL task.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop::IVsTask^An IVsTask that completes only when the TPL task that was returned from asyncFunction completes.
Type Parameters
- T
The return type of the task.
Show: