public EcommerceService(IOrderCoordinator orderCoordinator, IProductRepository productRepository, IVoucherRepository voucherRepository, IContactService contactService, IBespokePricingHandlerFactory bespokePricingHandlerFactory) { if (orderCoordinator == null) { throw new ArgumentNullException("orderCoordinator"); } _orderCoordinator = orderCoordinator; if (productRepository == null) { throw new ArgumentNullException("productRepository"); } _productRepository = productRepository; if (voucherRepository == null) { throw new ArgumentNullException("voucherRepository"); } _voucherRepository = voucherRepository; if (contactService == null) throw new ArgumentNullException("contactService"); _contactService = contactService; if (bespokePricingHandlerFactory == null) { throw new ArgumentNullException("bespokePricingHandlerFactory"); } _bespokePricingHandlerFactory = bespokePricingHandlerFactory; }
public OrderQueueService(IOrderQueue orderQueue, IOrderCoordinator orderCoordinator, IContactRepository contactRepository) { if (orderQueue == null) { throw new ArgumentNullException("orderQueue"); } _orderQueue = orderQueue; if (orderCoordinator == null) { throw new ArgumentNullException("orderCoordinator"); } _orderCoordinator = orderCoordinator; if (contactRepository == null) { throw new ArgumentNullException("contactRepository"); } _contactRepository = contactRepository; }