다음을 통해 공유


ExtensionMethods.RaiseEventAsync<T>(Delegate, Object, T) Method

Definition

Helper method to call each target of an async event sequentially, awaiting each until it completes.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ RaiseEventAsync(Delegate ^ eventHandler, System::Object ^ source, T args);
public static System.Threading.Tasks.Task RaiseEventAsync<T> (this Delegate eventHandler, object source, T args);
static member RaiseEventAsync : Delegate * obj * 'T -> System.Threading.Tasks.Task
<Extension()>
Public Function RaiseEventAsync(Of T) (eventHandler As Delegate, source As Object, args As T) As Task

Type Parameters

T

The argument type

Parameters

eventHandler
Delegate

A delegate taking (object, T) and returning Task

source
Object

The event's source parameter

args
T

The event's argument parameter

Returns

Applies to