Akka.Persistence.Tests.PersistentActorSpec.ChangeBehaviorInCommandHandlerFirstActor.NewBehavior C# (CSharp) Method

NewBehavior() protected method

protected NewBehavior ( object message ) : bool
message object
return bool
            protected bool NewBehavior(object message)
            {
                if (message is Cmd)
                {
                    var cmd = message as Cmd;
                    Context.UnbecomeStacked();
                    PersistAll(new[] { new Evt(cmd.Data + "-31"), new Evt(cmd.Data + "-32") }, UpdateStateHandler);
                    UpdateState(new Evt(cmd.Data + "-30"));
                    return true;
                }
                return false;
            }
        }
PersistentActorSpec.ChangeBehaviorInCommandHandlerFirstActor