Exemplo n.º 1
0
 public static async Task InvokeAsync(
     this AsyncEvent <Func <Task> > handler)
 {
     foreach (var t in handler.Subscriptions)
     {
         await t.Invoke().ConfigureAwait(false);
     }
 }
Exemplo n.º 2
0
 public static async Task InvokeAsync <T1, T2, T3, T4, T5, T6, T7, T8, T9>(
     this AsyncEvent <Func <T1, T2, T3, T4, T5, T6, T7, T8, T9, Task> > handler,
     T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
 {
     foreach (var t in handler.Subscriptions)
     {
         await t.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9).ConfigureAwait(false);
     }
 }
Exemplo n.º 3
0
 public static async Task InvokeAsync <T1, T2, T3, T4, T5>(
     this AsyncEvent <Func <T1, T2, T3, T4, T5, Task> > handler,
     T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
 {
     foreach (var t in handler.Subscriptions)
     {
         await t.Invoke(arg1, arg2, arg3, arg4, arg5).ConfigureAwait(false);
     }
 }