예제 #1
0
        public Task <bool> Handle(CadastrarPagamentoCommand message, CancellationToken cancellationToken)
        {
            if (!message.IsValid())
            {
                NotifyValidationErrors(message);
                return(Task.FromResult(false));
            }

            return(Task.FromResult(true));
        }
예제 #2
0
        public void CadastrarPagamento(Guid clienteId)
        {
            var cadastrarPagamentoCommand = new CadastrarPagamentoCommand(clienteId);

            _bus.SendCommand(cadastrarPagamentoCommand);
        }