Akka.Persistence.Tests.PersistentActorSpec.ChangeBehaviorInLastEventHandlerActor.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;

                    Persist(new Evt(cmd.Data + "-21"), UpdateStateHandler);
                    Persist(new Evt(cmd.Data + "-22"), evt =>
                    {
                        UpdateState(evt);
                        Context.UnbecomeStacked();
                    });
                    return true;
                }
                return false;
            }
        }
PersistentActorSpec.ChangeBehaviorInLastEventHandlerActor