Ejemplo n.º 1
0
 public void Process1(TreeMachine.IContext ctx)
 {
     var str = ctx.CurrentMessage as string;
     if (str != null)
     {
         _msgs1.Enqueue(str);
         Self.Tell(new InternalMessage(), Sender);
     }
 }
Ejemplo n.º 2
0
            public void Process2(TreeMachine.IContext ctx)
            {
                var str = ctx.CurrentMessage as string;
                if (str != null)
                {
                    _msgs2.Enqueue(str);
                }

                var intmsg = ctx.CurrentMessage as InternalMessage;
                if (intmsg != null)
                {
                    Sender.Tell($"1{_msgs1.Dequeue()}2{_msgs2.Dequeue()}");
                }
            }
Ejemplo n.º 3
0
 private void ReplyEcho(TreeMachine.IContext ctx) => Sender.Tell(ctx.CurrentMessage);