public static void Tell(this IInitableActorRef model, object msg, IActorRef sender)
 {
     model.Actor.Tell(msg, sender);
 }
 public static Task <TResult> Ask <TResult>(this IInitableActorRef model, object message, TimeSpan?timeout = null)
 => model.Actor.Ask <TResult>(message, timeout);
Exemple #3
0
 public static Maybe <Unit> Tell(this IInitableActorRef model, object msg)
 => Tell(model, msg, ActorRefs.NoSender);
Exemple #4
0
 public static Maybe <Unit> Tell(this IInitableActorRef model, object msg, IActorRef sender)
 => from act in model.Actor
 select Action(() => act.Tell(msg, sender));
Exemple #5
0
 public static async Task <TResult> Ask <TResult>(this IInitableActorRef model, object message, TimeSpan?timeout = null)
 {
     return(await MatchAsync(model.Actor,
                             r => r.Ask <TResult>(message, timeout),
                             () => Task.FromException <TResult>(new InvalidOperationException("Actor not Initialized"))));
 }