Example #1
0
        public KListService(IMailingListClient client, IKenticoSiteProvider site, IAddressValidationClient validationClient, IMapper mapper)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }
            if (site == null)
            {
                throw new ArgumentNullException(nameof(site));
            }
            if (validationClient == null)
            {
                throw new ArgumentNullException(nameof(validationClient));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            _mailingClient    = client;
            _site             = site;
            _mapper           = mapper;
            _validationClient = validationClient;
        }
Example #2
0
        public OrderDetailService(IMapper mapper,
                                  IOrderViewClient orderViewClient,
                                  IMailingListClient mailingClient,
                                  IKenticoOrderProvider kenticoOrder,
                                  IShoppingCartProvider shoppingCart,
                                  IKenticoProductsProvider products,
                                  IKenticoUserProvider kenticoUsers,
                                  IKenticoResourceService resources,
                                  IKenticoLogger kenticoLog,
                                  IKenticoLocalizationProvider localization,
                                  IKenticoPermissionsProvider permissions,
                                  IKenticoBusinessUnitsProvider businessUnits
                                  )
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (orderViewClient == null)
            {
                throw new ArgumentNullException(nameof(orderViewClient));
            }
            if (mailingClient == null)
            {
                throw new ArgumentNullException(nameof(mailingClient));
            }
            if (kenticoOrder == null)
            {
                throw new ArgumentNullException(nameof(kenticoOrder));
            }
            if (shoppingCart == null)
            {
                throw new ArgumentNullException(nameof(shoppingCart));
            }
            if (products == null)
            {
                throw new ArgumentNullException(nameof(products));
            }
            if (kenticoUsers == null)
            {
                throw new ArgumentNullException(nameof(kenticoUsers));
            }
            if (resources == null)
            {
                throw new ArgumentNullException(nameof(resources));
            }
            if (kenticoLog == null)
            {
                throw new ArgumentNullException(nameof(kenticoLog));
            }
            if (localization == null)
            {
                throw new ArgumentNullException(nameof(localization));
            }
            if (permissions == null)
            {
                throw new ArgumentNullException(nameof(permissions));
            }
            if (businessUnits == null)
            {
                throw new ArgumentNullException(nameof(businessUnits));
            }

            this.mapper          = mapper;
            this.orderViewClient = orderViewClient;
            this.kenticoOrder    = kenticoOrder;
            this.shoppingCart    = shoppingCart;
            this.products        = products;
            this.kenticoUsers    = kenticoUsers;
            this.resources       = resources;
            this.mailingClient   = mailingClient;
            this.kenticoLog      = kenticoLog;
            this.localization    = localization;
            this.permissions     = permissions;
            this.businessUnits   = businessUnits;
        }