Exemplo n.º 1
0
        public async Task Dispatch <T>(T command) where T : DomainCommand
        {
            var log = _logfactory.CreateLogger <T>();

            try
            {
                log.LogInformation($"Start dispatch  '{typeof(T)}' domain command");

                await _commandService.Dispatch(command);

                log.LogInformation($"End dispatch '{typeof(T)}' domain command");
            }
            catch (Exception ex)
            {
                log.LogError(ex, $"Error dispatching '{typeof(T)}' domain command");

                throw;
            }
        }
Exemplo n.º 2
0
 public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.UpdateVendorRegistrationCaseStatus)] UpdateVendorRegistrationCaseStatusForAccountCommand command)
 {
     await _commandService.Dispatch(command);
 }
 public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.ApprenticeshipIncentivesWithdraw)] WithdrawCommand command)
 {
     await _commandService.Dispatch(command);
 }
Exemplo n.º 4
0
 public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.CompleteEarningsCalculation)] CompleteEarningsCalculationCommand command)
 {
     await _commandService.Dispatch(command);
 }
Exemplo n.º 5
0
 public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.ApprenticeshipIncentivesCalculateEarnings)] CalculateEarningsCommand command)
 {
     await _commandService.Dispatch(command);
 }