public OrdersController(
            IOrderService orderService,
            ICompleteOrderService completeOrderService)
        {
            this.orderService = orderService ?? throw new ArgumentNullException(nameof(orderService));

            if (completeOrderService is null)
            {
                throw new ArgumentNullException(nameof(completeOrderService));
            }

            updateOrderStatusActionFactory.Add(OrderStatus.Complete, completeOrderService.CompleteAsync);
        }
예제 #2
0
 public CheckoutController(IGatewayAuthenticationService gatewayAuthenticationService, IGatewayCheckoutService gatewayChekoutService, ICompleteOrderService completeOrderService)
 {
     _gatewayAuthenticationService = gatewayAuthenticationService;
     _gatewayChekoutService        = gatewayChekoutService;
     _completeOrderService         = completeOrderService;
 }