public async Task <CommandHandlingResult> Handle(Commands.CompleteOperationCommand command, IEventPublisher eventPublisher) { var sw = new Stopwatch(); sw.Start(); try { await _operationsClient.Complete(command.CommandId); return(CommandHandlingResult.Ok()); } finally { sw.Stop(); _log.Info("Command execution time", context: new { TxHandler = new { Handler = nameof(OperationsCommandHandler), Command = nameof(Commands.CompleteOperationCommand), Time = sw.ElapsedMilliseconds } }); } }
public async Task <CommandHandlingResult> Handle(Commands.CompleteOperationCommand command, IEventPublisher eventPublisher) { await _operationsClient.Complete(command.CommandId); return(CommandHandlingResult.Ok()); }