예제 #1
0
 public static async Task <Object> Receive <T1, T2, T3, T4>(this BaseActor anActor, Func <T1, T2, T3, T4, bool> aPattern)
 {
     CheckArg.Actor(anActor);
     return(await anActor.Receive((o) =>
     {
         IMessageParam <T1, T2, T3, T4> t = o as IMessageParam <T1, T2, T3, T4>;
         return t != null ? aPattern(t.Item1, t.Item2, t.Item3, t.Item4) : false;
     }));
 }
예제 #2
0
 public static Task <object> Receive <T1, T2, T3, T4>(this BaseActor anActor, Func <T1, T2, T3, T4, bool> aPattern)
 {
     CheckArg.Actor(anActor);
     return(anActor.Receive((o) => o is IMessageParam <T1, T2, T3, T4> t ? aPattern(t.Item1, t.Item2, t.Item3, t.Item4) : false));
 }