public static async Task InvokeAsync <T1, T2, T3, T4, T5>(this AsyncEvent <Func <T1, T2, T3, T4, T5, Task> > eventHandler, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { var subscribers = eventHandler.Subscriptions; for (int i = 0; i < subscribers.Count; i++) { await subscribers[i].Invoke(arg1, arg2, arg3, arg4, arg5).ConfigureAwait(false); } }
public static async Task InvokeAsync(this AsyncEvent <Func <Task> > eventHandler) { var subscribers = eventHandler.Subscriptions; for (int i = 0; i < subscribers.Count; i++) { await subscribers[i].Invoke().ConfigureAwait(false); } }
public static async Task InvokeAsync(this AsyncEvent <ShuttingDownEventHandler> eventHandler, ShuttingDownEventArgs e) { var subscribers = eventHandler.Subscriptions; for (int i = 0; i < subscribers.Count; i++) { await subscribers[i].Invoke(e).ConfigureAwait(false); } }