Beispiel #1
0
        public AskSpec(ITestOutputHelper output) : base(output)
        {
            this.behavior = Behaviors.Receive <Msg>(async(ctx, msg) =>
            {
                switch (msg.Type)
                {
                case MessageType.Foo:
                    msg.ReplyTo.Tell("foo");
                    return(Behaviors.Same <Msg>());

                case MessageType.Stop:
                    msg.ReplyTo.Tell("stopped");
                    return(Behaviors.Stopped <Msg>());

                default: throw new NotImplementedException();
                }
                ;
            });
        }