Ejemplo n.º 1
0
 public GetBankTransferDetailsCommandHandler(IHttpContextAccessor httpContextAccessor,
                                             IOrderRepository orderRepository, IGrpcServiceClientFactory <IIdentityService> grpcServiceClientFactory,
                                             IOptions <ServicesEndpointsConfig> options)
 {
     _httpContext = httpContextAccessor.HttpContext ??
                    throw new ArgumentNullException(nameof(httpContextAccessor.HttpContext));
     _orderRepository          = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _grpcServiceClientFactory = grpcServiceClientFactory ?? throw new ArgumentNullException(nameof(grpcServiceClientFactory));
     _endpointsConfig          = options.Value ?? throw new ArgumentNullException(nameof(options.Value));
 }
Ejemplo n.º 2
0
 public RemoveOfferCommandHandler(IHttpContextAccessor httpContextAccessor, IOfferRepository offerRepository,
                                  IGrpcServiceClientFactory <IOrdersService> ordersServiceClientFactory,
                                  IOptions <ServicesEndpointsConfig> options)
 {
     _httpContext = httpContextAccessor.HttpContext ??
                    throw new ArgumentNullException(nameof(httpContextAccessor.HttpContext));
     _offerRepository            = offerRepository ?? throw new ArgumentNullException(nameof(offerRepository));
     _ordersServiceClientFactory = ordersServiceClientFactory ?? throw new ArgumentNullException(nameof(ordersServiceClientFactory));
     _endpointsConfig            = options.Value ?? throw new ArgumentNullException(nameof(options.Value));
 }
Ejemplo n.º 3
0
 public GetAvailableDeliveryMethodsForOrderQueryHandler(IHttpContextAccessor httpContextAccessor,
                                                        IOrderRepository orderRepository, IGrpcServiceClientFactory <IOffersService> offersServiceClientFactory,
                                                        IOptions <ServicesEndpointsConfig> options)
 {
     _httpContext = httpContextAccessor.HttpContext ??
                    throw new ArgumentNullException(nameof(httpContextAccessor.HttpContext));
     _orderRepository            = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     _offersServiceClientFactory = offersServiceClientFactory ?? throw new ArgumentNullException(nameof(offersServiceClientFactory));
     _endpointsConfig            = options.Value ?? throw new ArgumentNullException(nameof(options.Value));
 }
Ejemplo n.º 4
0
 public AddToCartCommandHandler(ILogger <AddToCartCommandHandler> logger, IHttpContextAccessor httpContextAccessor,
                                ICartRepository cartRepository, IGrpcServiceClientFactory <IOffersService> offersServiceClientFactory,
                                IOptions <ServicesEndpointsConfig> options)
 {
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     _httpContext = httpContextAccessor.HttpContext ??
                    throw new ArgumentNullException(nameof(httpContextAccessor.HttpContext));
     _cartRepository             = cartRepository ?? throw new ArgumentNullException(nameof(cartRepository));
     _offersServiceClientFactory = offersServiceClientFactory ??
                                   throw new ArgumentNullException(nameof(offersServiceClientFactory));
     _endpointsConfig = options.Value ?? throw new ArgumentNullException(nameof(options.Value));
 }
Ejemplo n.º 5
0
 public FinalizeCartCommandHandler(ILogger <FinalizeCartCommandHandler> logger,
                                   IHttpContextAccessor httpContextAccessor, ICartRepository cartRepository,
                                   IGrpcServiceClientFactory <IOrdersService> ordersServiceClientFactory,
                                   IGrpcServiceClientFactory <IOffersService> offersServiceClientFactory,
                                   IOptions <ServicesEndpointsConfig> options, IEventBus eventBus,
                                   ICartItemRepository cartItemRepository)
 {
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     _httpContext = httpContextAccessor.HttpContext ??
                    throw new ArgumentNullException(nameof(httpContextAccessor.HttpContext));
     _cartRepository             = cartRepository ?? throw new ArgumentNullException(nameof(cartRepository));
     _ordersServiceClientFactory = ordersServiceClientFactory ??
                                   throw new ArgumentNullException(nameof(ordersServiceClientFactory));
     _offersServiceClientFactory = offersServiceClientFactory ?? throw new ArgumentNullException(nameof(offersServiceClientFactory));
     _endpointsConfig            = options.Value ?? throw new ArgumentNullException(nameof(options.Value));
     _eventBus           = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     _cartItemRepository = cartItemRepository ?? throw new ArgumentNullException(nameof(cartItemRepository));
 }