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);
public static Maybe <Unit> Tell(this IInitableActorRef model, object msg) => Tell(model, msg, ActorRefs.NoSender);
public static Maybe <Unit> Tell(this IInitableActorRef model, object msg, IActorRef sender) => from act in model.Actor select Action(() => act.Tell(msg, sender));
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")))); }