コード例 #1
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public CategoryProductsProvider(ApiProductsProvider apiProductsProvider, ProductMapper productMapper)
        {
            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            this.apiProductsProvider = apiProductsProvider;
            this.productMapper = productMapper;
        }
コード例 #2
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public CategoryProductsProvider(ApiProductsProvider apiProductsProvider, ProductMapper productMapper)
        {
            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            this.apiProductsProvider = apiProductsProvider;
            this.productMapper       = productMapper;
        }
コード例 #3
0
        /// <summary>
        /// Create new instance wrapping the base service.
        /// </summary>
        public SetupFeeCartPricingService(ICartPricingService baseCartPricingService, ApiProductsProvider apiProductsProvider)
        {
            if (baseCartPricingService == null)
            {
                throw new ArgumentNullException("baseCartPricingService");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            this.baseCartPricingService = baseCartPricingService;
            this.apiProductsProvider    = apiProductsProvider;
        }
コード例 #4
0
        /// <summary>
        /// Create new instance wrapping the base service.
        /// </summary>
        public SetupFeeCartPricingService(ICartPricingService baseCartPricingService, ApiProductsProvider apiProductsProvider)
        {
            if (baseCartPricingService == null)
            {
                throw new ArgumentNullException("baseCartPricingService");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            this.baseCartPricingService = baseCartPricingService;
            this.apiProductsProvider = apiProductsProvider;
        }
コード例 #5
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public DomainsProvider(
            IResellerDataProvider resellerDataProvider,
            ICurrencyPreferenceProvider currencyPreferenceProvider,
            ApiProductsProvider apiProductsProvider,
            ProductMapper productMapper,
            PublicBillingApiProxy billingApi,
            IShopNameProvider shopNameProvider) : base(billingApi)
        {
            if (resellerDataProvider == null)
            {
                throw new ArgumentException("resellerDataProvider");
            }

            if (currencyPreferenceProvider == null)
            {
                throw new ArgumentException("currencyPreferenceProvider");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            if (shopNameProvider == null)
            {
                throw new ArgumentNullException("shopNameProvider");
            }

            var resellerData = resellerDataProvider.GetResellerAccountData();

            this.resellerId       = resellerData.Id;
            this.countryCode      = resellerData.DefaultCountry.Code;
            this.currencyCode     = currencyPreferenceProvider.GetCurrentCurrency().Code;
            this.productMapper    = productMapper;
            this.shopNameProvider = shopNameProvider;

            this.tldProducts = apiProductsProvider.GetProductsByCategories(new List <string> {
                "TLD"
            });
        }
コード例 #6
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public DomainsProvider(
            IResellerDataProvider resellerDataProvider, 
            ICurrencyPreferenceProvider currencyPreferenceProvider, 
            ApiProductsProvider apiProductsProvider, 
            ProductMapper productMapper,
            PublicBillingApiProxy billingApi,
            IShopNameProvider shopNameProvider) : base(billingApi)
        {
            if (resellerDataProvider == null)
            {
                throw new ArgumentException("resellerDataProvider");
            }

            if (currencyPreferenceProvider == null)
            {
                throw new ArgumentException("currencyPreferenceProvider");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            if (shopNameProvider == null)
            {
                throw new ArgumentNullException("shopNameProvider");
            }

            var resellerData = resellerDataProvider.GetResellerAccountData();

            this.resellerId = resellerData.Id;
            this.countryCode = resellerData.DefaultCountry.Code;
            this.currencyCode = currencyPreferenceProvider.GetCurrentCurrency().Code;
            this.productMapper = productMapper;
            this.shopNameProvider = shopNameProvider;

            this.tldProducts = apiProductsProvider.GetProductsByCategories(new List<string> { "TLD" });
        }