/// <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" }); }
/// <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" }); }
public ApiProductsProvider(IProductsProvider productsProvider, IShopNameProvider shopNameProvider, IResellerProvider resellerProvider) { if (productsProvider == null) { throw new ArgumentNullException("productsProvider"); } if (shopNameProvider == null) { throw new ArgumentNullException("shopNameProvider"); } if (resellerProvider == null) { throw new ArgumentNullException("resellerProvider"); } this.productsProvider = productsProvider; this.resellerId = resellerProvider.GetReseller().Id; this.shopName = shopNameProvider.GetShopName(); }
public ApiProductsProvider(IProductsProvider productsProvider, IShopNameProvider shopNameProvider, IResellerProvider resellerProvider) { if (productsProvider == null) { throw new ArgumentNullException("productsProvider"); } if (shopNameProvider == null) { throw new ArgumentNullException("shopNameProvider"); } if (resellerProvider == null) { throw new ArgumentNullException("resellerProvider"); } this.productsProvider = productsProvider; this.resellerId = resellerProvider.GetReseller().Id; this.shopName = shopNameProvider.GetShopName(); }