AsyncEventHandler<TEventArgs> Delegate

Definition

An asynchronous event handler.

C++
generic <typename T>
 where T : EventArgspublic delegate System::Threading::Tasks::Task ^ AsyncEventHandler(System::Object ^ sender, T args);
C++
generic <typename TEventArgs>
public delegate System::Threading::Tasks::Task ^ AsyncEventHandler(System::Object ^ sender, TEventArgs args);

Type Parameters

T TEventArgs

The type of event arguments.

Parameters

sender
Object

The sender of the event.

args
TEventArgs

Event arguments.

Return Value

A task whose completion signals handling is finished.

Extension Methods

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

Invokes asynchronous event handlers, returning a task that completes when all event handlers have been invoked. Each handler is fully executed (including continuations) before the next handler in the list is invoked.

Applies to

Tuote Versiot
Visual Studio SDK 2015, 2017, 2019, 2022