VsTaskLibraryHelper.InvokeAsync<T>(IVsTaskSchedulerService, VsInvokableAsyncFunction<T>) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Função auxiliar que transforma uma tarefa TPL de uma função Async em um IVsTask.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static Microsoft::VisualStudio::Shell::Interop::IVsTask ^ InvokeAsync(Microsoft::VisualStudio::Shell::Interop::IVsTaskSchedulerService ^ scheduler, Microsoft::VisualStudio::Shell::VsInvokableAsyncFunction<T> ^ asyncFunction);
public static Microsoft.VisualStudio.Shell.Interop.IVsTask InvokeAsync<T> (this Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerService scheduler, Microsoft.VisualStudio.Shell.VsInvokableAsyncFunction<T> asyncFunction);
static member InvokeAsync : Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerService * Microsoft.VisualStudio.Shell.VsInvokableAsyncFunction<'T> -> Microsoft.VisualStudio.Shell.Interop.IVsTask
<Extension()>
Public Function InvokeAsync(Of T) (scheduler As IVsTaskSchedulerService, asyncFunction As VsInvokableAsyncFunction(Of T)) As IVsTask
Parâmetros de tipo
- T
O tipo de retorno da tarefa.
Parâmetros
- scheduler
- IVsTaskSchedulerService
IVsTaskScheduler usado para criar o IVsTaskCompletionSource.
- asyncFunction
- VsInvokableAsyncFunction<T>
Função assíncrona que usa um IVsTaskCompletionSource e retorna uma tarefa TPL.
Retornos
Retorna um IVsTask que só será concluído depois que a tarefa TPL retornada de asyncFunction for concluída.