/// <summary> /// Event handler which confirms that the grace period /// has been completed and order will not initially be cancelled. /// Therefore, the order process continues for validation. /// </summary> /// <param name="event"> /// </param> /// <returns></returns> public async Task Handle(GracePeriodConfirmedIntegrationEvent @event) { using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}")) { _logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event); var command = new SetAwaitingValidationOrderStatusCommand(@event.OrderId); _logger.LogInformation( "----- Sending command: {CommandName} - {IdProperty}: {CommandId} ({@Command})", command.GetGenericTypeName(), nameof(command.OrderNumber), command.OrderNumber, command); await _mediator.Send(command); } }
/// <summary> /// Event handler which confirms that the grace period /// has been completed and order will not initially be cancelled. /// Therefore, the order process continues for validation. /// </summary> /// <param name="event"> /// </param> /// <returns></returns> public async Task Handle(GracePeriodConfirmedIntegrationEvent @event) { var command = new SetAwaitingValidationOrderStatusCommand(@event.OrderId); await _mediator.Send(command); }