Example #1
0
        public bool Execute(CancelCommand command)
        {
            if (!IsNew)
            {
                Emit(new CancelledEvent());
                Sender.Tell(new SuccessExecutionResult(), Self);
            }
            else
            {
                Log.Error($"{command.GetType().PrettyPrint()} has failed ");
                Sender.Tell(new FailedExecutionResult(new List <string> {
                    "aggregate is not created"
                }), Self);
            }

            return(true);
        }