public OrdersController(IOrdersRepository ordersRepository, IOrdersFactory ordersFactory, ILogger <OrdersController> logger, IStockService stockService) { _ordersRepository = ordersRepository; _ordersFactory = ordersFactory; _logger = logger; _stockService = stockService; }
public CheckOutPresenter(ICheckOutView view, IShoppingCartsService shoppingCartsService, IUsersService usersService, IOrdersService ordersService, IAddressesService addressesService, IAddressesFactory addressesFactory, IOrdersFactory ordersFactory) : base(view) { if (shoppingCartsService == null) { throw new ArgumentNullException("Shopping carts service cannot be null."); } if (usersService == null) { throw new ArgumentNullException("Users service cannot be null."); } if (ordersService == null) { throw new ArgumentNullException("Orders service cannot be null."); } if (addressesService == null) { throw new ArgumentNullException("Addresses service cannot be null."); } if (addressesFactory == null) { throw new ArgumentNullException("Addresses factory cannot be null."); } if (ordersFactory == null) { throw new ArgumentNullException("Orders factory cannot be null."); } this.shoppingCartsService = shoppingCartsService; this.usersService = usersService; this.ordersService = ordersService; this.addressesService = addressesService; this.addressesFactory = addressesFactory; this.ordersFactory = ordersFactory; this.View.CheckingOut += OnCheckingOut; this.View.CartClearing += OnCartClearing; }