Akka.Cluster.Sharding.Tests.Counter.ReceiveCommand C# (CSharp) Method

ReceiveCommand() protected method

protected ReceiveCommand ( object message ) : bool
message object
return bool
        protected override bool ReceiveCommand(object message)
        {
            return message.Match()
                .With<Increment>(_ => Persist(new CounterChanged(1), UpdateState))
                .With<Increment>(_ => Persist(new CounterChanged(-1), UpdateState))
                .With<Get>(_ => Sender.Tell(_count))
                .With<ReceiveTimeout>(_ => Context.Parent.Tell(new Passivate(Stop.Instance)))
                .With<Stop>(_ => Context.Stop(Self))
                .WasHandled;
        }