Lingua

TplExtensions.InvokeAsync Metodo

Definizione

Overload

Nome Descrizione
InvokeAsync(AsyncEventHandler, Object, EventArgs)

Richiama i gestori eventi asincroni, restituendo un'attività che viene completata quando tutti i gestori eventi sono stati richiamati. Ogni gestore viene eseguito completamente (incluse le continuazioni) prima che venga richiamato il gestore successivo nell'elenco.

InvokeAsync<TEventArgs>(AsyncEventHandler<TEventArgs>, Object, TEventArgs)

Richiama i gestori eventi asincroni, restituendo un'attività che viene completata quando tutti i gestori eventi sono stati richiamati. Ogni gestore viene eseguito completamente (incluse le continuazioni) prima che venga richiamato il gestore successivo nell'elenco.

InvokeAsync(AsyncEventHandler, Object, EventArgs)

Richiama i gestori eventi asincroni, restituendo un'attività che viene completata quando tutti i gestori eventi sono stati richiamati. Ogni gestore viene eseguito completamente (incluse le continuazioni) prima che venga richiamato il gestore successivo nell'elenco.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ InvokeAsync(Microsoft::VisualStudio::Threading::AsyncEventHandler ^ handlers, System::Object ^ sender, EventArgs ^ args);
public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.VisualStudio.Threading.AsyncEventHandler handlers, object sender, EventArgs args);
public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.VisualStudio.Threading.AsyncEventHandler? handlers, object? sender, EventArgs args);
static member InvokeAsync : Microsoft.VisualStudio.Threading.AsyncEventHandler * obj * EventArgs -> System.Threading.Tasks.Task
<Extension()>
Public Function InvokeAsync (handlers As AsyncEventHandler, sender As Object, args As EventArgs) As Task

Parametri

handlers
AsyncEventHandler

Gestori eventi. Può essere null.

sender
Object

Origine evento.

args
EventArgs

Argomento dell'evento.

Valori restituiti

Attività che viene completata al termine di tutti i gestori.

Eccezioni

Generata se i gestori hanno esito negativo. Contiene una raccolta di tutti gli errori.

Si applica a

InvokeAsync<TEventArgs>(AsyncEventHandler<TEventArgs>, Object, TEventArgs)

Richiama i gestori eventi asincroni, restituendo un'attività che viene completata quando tutti i gestori eventi sono stati richiamati. Ogni gestore viene eseguito completamente (incluse le continuazioni) prima che venga richiamato il gestore successivo nell'elenco.

public:
generic <typename TEventArgs>
 where TEventArgs : EventArgs[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ InvokeAsync(Microsoft::VisualStudio::Threading::AsyncEventHandler<TEventArgs> ^ handlers, System::Object ^ sender, TEventArgs args);
public:
generic <typename TEventArgs>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ InvokeAsync(Microsoft::VisualStudio::Threading::AsyncEventHandler<TEventArgs> ^ handlers, System::Object ^ sender, TEventArgs args);
public static System.Threading.Tasks.Task InvokeAsync<TEventArgs>(this Microsoft.VisualStudio.Threading.AsyncEventHandler<TEventArgs> handlers, object sender, TEventArgs args) where TEventArgs : EventArgs;
public static System.Threading.Tasks.Task InvokeAsync<TEventArgs>(this Microsoft.VisualStudio.Threading.AsyncEventHandler<TEventArgs>? handlers, object? sender, TEventArgs args);
static member InvokeAsync : Microsoft.VisualStudio.Threading.AsyncEventHandler<'EventArgs (requires 'EventArgs :> EventArgs)> * obj * 'EventArgs -> System.Threading.Tasks.Task (requires 'EventArgs :> EventArgs)
static member InvokeAsync : Microsoft.VisualStudio.Threading.AsyncEventHandler<'EventArgs> * obj * 'EventArgs -> System.Threading.Tasks.Task
<Extension()>
Public Function InvokeAsync(Of TEventArgs As EventArgs) (handlers As AsyncEventHandler(Of TEventArgs), sender As Object, args As TEventArgs) As Task
<Extension()>
Public Function InvokeAsync(Of TEventArgs) (handlers As AsyncEventHandler(Of TEventArgs), sender As Object, args As TEventArgs) As Task

Parametri di tipo

TEventArgs

Tipo di argomento passato a ogni gestore.

Parametri

handlers
AsyncEventHandler<TEventArgs>

Gestori eventi. Può essere null.

sender
Object

Origine evento.

args
TEventArgs

Argomento dell'evento.

Valori restituiti

Attività che viene completata al termine di tutti i gestori. L'attività viene generata in caso di errore se un gestore genera un'eccezione.

Eccezioni

Generata se i gestori hanno esito negativo. Contiene una raccolta di tutti gli errori.

Si applica a