コード例 #1
0
 public UserCheckoutAcceptedIntegrationEventHandler(IMediator mediator,
                                                    ILoggerFactory logger, IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _logger   = logger ?? throw new ArgumentNullException(nameof(logger));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException(nameof(orderingIntegrationEventService));
 }
 public OrderCancelledDomainEventHandler(
     IOrderingIntegrationEventService orderingIntegrationEventService,
     ILogger <OrderCancelledDomainEventHandler> logger)
 {
     _orderingIntegrationEventService = orderingIntegrationEventService;
     _logger = logger;
 }
 public OrderStatusChangedToAwaitingValidationDomainEventHandler(
     IOrderRepository orderRepository, ILoggerFactory logger,
     IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _orderingIntegrationEventService = orderingIntegrationEventService;
 }
コード例 #4
0
 public OrderStatusChangedToStockConfirmedDomainEventHandler(
     IOrderRepository orderRepository, ILoggerFactory logger,
     IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     this._orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     this._logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     this._orderingIntegrationEventService = orderingIntegrationEventService;
 }
コード例 #5
0
 public TransactionBehaviour(OrderingContext dbContext,
                             IOrderingIntegrationEventService orderingIntegrationEventService,
                             ILogger <TransactionBehaviour <TRequest, TResponse> > logger)
 {
     _dbContext = dbContext ?? throw new ArgumentException(nameof(OrderingContext));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentException(nameof(orderingIntegrationEventService));
     _logger = logger ?? throw new ArgumentException(nameof(ILogger));
 }
 public SetOrderStatusAwaitingStockValidationCommandHandler(IOrderRepository orderRepository,
                                                            IOrderingIntegrationEventService orderingIntegrationEventService,
                                                            ILogger <SetOrderStatusAwaitingStockValidationCommandHandler> logger)
 {
     _orderRepository         = orderRepository ?? throw new ArgumentNullException("OrderRepository was null.");
     _integrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException("Ordering integration event service was null.");
     _logger = logger;
 }
コード例 #7
0
 public UpdateOrderWhenBuyerAndPaymentMethodVerifiedDomainEventHandler(
     IOrderRepository orderRepository, ILoggerFactory logger,
     IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException(nameof(orderingIntegrationEventService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #8
0
 public CreateOrderCommandHandler(IOrderRepository orderRepository, IMediator mediator,
                                  IOrderingIntegrationEventService OrderingIntegrationEventService,
                                  ILogger <CreateOrderCommandHandler> logger)
 {
     this.orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     this.mediator        = mediator ?? throw new ArgumentNullException(nameof(mediator));
     this.OrderingIntegrationEventService = OrderingIntegrationEventService ?? throw new ArgumentNullException(nameof(OrderingIntegrationEventService));
     this.logger = logger;
 }
コード例 #9
0
 public TransactionBehavior(
     ILogger <TransactionBehavior <TRequest, TResponse> > logger,
     OrderingContext orderingContext,
     IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _orderingContext = orderingContext ?? throw new ArgumentNullException(nameof(orderingContext));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException(nameof(orderingIntegrationEventService));
 }
コード例 #10
0
 public CreateOrderCommandHandler(
     IOrderRepository orderRepository,
     IOrderingIntegrationEventService orderingIntegrationEventService,
     ILogger <CreateOrderCommandHandler> logger)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException(nameof(orderingIntegrationEventService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public UpdateOrderOnPaymentMethodVerifiedEventHandler(
     IOrderRepository orderRepository,
     IOrderingIntegrationEventService orderingIntegrationEventService,
     ILoggerFactory loggerFactory)
 {
     _logger          = loggerFactory;
     _orderRepository = orderRepository;
     _orderingIntegrationEventService = orderingIntegrationEventService;
 }
コード例 #12
0
 public OrderStatusChangedToStockConfirmedDomainEventHandler(
     IOrderRepository orderRepository, ILoggerFactory logger,
     IOrderingIntegrationEventService orderingIntegrationEventService,
     IOptionsSnapshot <OrderingSettings> settings)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _orderingIntegrationEventService = orderingIntegrationEventService;
     _settings = settings.Value;
 }
コード例 #13
0
 public OrderCancelledDomainEventHandler(
     IOrderRepository orderRepository,
     ILoggerFactory logger,
     IBuyerRepository buyerRepository,
     IOrderingIntegrationEventService orderingIntegrationEventService)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _buyerRepository = buyerRepository ?? throw new ArgumentNullException(nameof(buyerRepository));
 }
 // Using DI to inject infrastructure persistence Repositories
 public CreateOrderCommandHandler(IMediator mediator,
                                  IOrderingIntegrationEventService orderingIntegrationEventService,
                                  IOrderRepository orderRepository,
                                  IIdentityService identityService)
 {
     _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _identityService = identityService ?? throw new ArgumentNullException(nameof(identityService));
     _mediator        = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _orderingIntegrationEventService = orderingIntegrationEventService ?? throw new ArgumentNullException(nameof(orderingIntegrationEventService));
 }
 public ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler(
     IBuyerRepository buyerRepository,
     IOrderingIntegrationEventService orderingIntegrationEventService,
     ILoggerFactory loggerFactory)
 {
     _buyerRepository = buyerRepository ?? throw new ArgumentNullException(nameof(buyerRepository));
     _orderingIntegrationEventService = orderingIntegrationEventService ??
                                        throw new ArgumentNullException(nameof(orderingIntegrationEventService));
     _logger = loggerFactory.CreateLogger(nameof(ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler));
 }
 public SendStockConfirmedIntegrationEventWhenStockConfirmed(
     IOrderRepository orderRepository,
     IBuyerRepository buyerRepository,
     IOrderingIntegrationEventService orderingIntegrationEventService,
     ILogger <SendStockConfirmedIntegrationEventWhenStockConfirmed> logger)
 {
     _logger          = logger;
     _orderRepository = orderRepository;
     _buyerRepository = buyerRepository;
     _orderingIntegrationEventService = orderingIntegrationEventService;
 }
コード例 #17
0
 public ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler(
     ILoggerFactory logger,
     IBuyerRepository buyerRepository,
     IIdentityService identityService,
     IOrderingIntegrationEventService orderIntegrationEventService)
 {
     this._identityService = identityService;
     this._orderIntegrationEventService = orderIntegrationEventService;
     this._logger          = logger;
     this._buyerRepository = buyerRepository;
 }
コード例 #18
0
 public CreateOrderCommandHandler(IMediator mediator,
                                  IOrderingIntegrationEventService orderingIntegrationEventService,
                                  IOrderRepository orderRepository,
                                  IIdentityService identityService,
                                  ILogger <CreateOrderCommandHandler> logger)
 {
     this._mediator = mediator;
     this._orderingIntegrationEventService = orderingIntegrationEventService;
     this._orderRepository = orderRepository ?? throw new ArgumentException(nameof(orderRepository));
     this._identityService = identityService;
     this._logger          = logger;
 }
コード例 #19
0
 public OrderStatusChangedToAwaitingStockValidationDomainEventHandler(IOrderingIntegrationEventService integrationEventService,
                                                                      ILogger <OrderStatusChangedToAwaitingStockValidationDomainEventHandler> logger)
 {
     _orderingIntegrationEventService = integrationEventService;
     _logger = logger;
 }
コード例 #20
0
 public OrderShippedDomainEventHandler(IOrderingIntegrationEventService integrationEventService,
                                       ILogger <OrderShippedDomainEventHandler> logger)
 {
     this._orderingIntegrationEventService = integrationEventService;
     this._logger = logger;
 }