public async Task <CommandHandlingResult> Handle(Commands.SetLinkedCashInOperationCommand command, IEventPublisher eventPublisher)
        {
            eventPublisher.PublishEvent(new ForwardWithdawalLinkedEvent {
                Message = command.Message
            });

            return(CommandHandlingResult.Ok());
        }
Ejemplo n.º 2
0
        public async Task <CommandHandlingResult> Handle(Commands.SetLinkedCashInOperationCommand command, IEventPublisher eventPublisher)
        {
            var sw = new Stopwatch();

            sw.Start();

            try
            {
                eventPublisher.PublishEvent(new ForwardWithdawalLinkedEvent {
                    Message = command.Message
                });
                return(CommandHandlingResult.Ok());
            }
            finally
            {
                sw.Stop();
                _log.Info("Command execution time",
                          context: new { TxHandler = new { Handler = nameof(ForwardWithdrawalCommandHandler), Command = nameof(Commands.SetLinkedCashInOperationCommand),
                                                           Time    = sw.ElapsedMilliseconds } });
            }
        }