public OrdersController(OrderRepository orderRepository, IShoppingService shoppingService, ICurrencyInfoProvider currencyInfoProvider, IOrderStatusInfoProvider orderStatusInfoProvider, ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider) { this.orderRepository = orderRepository; this.shoppingService = shoppingService; this.currencyInfoProvider = currencyInfoProvider; this.orderStatusInfoProvider = orderStatusInfoProvider; this.countryInfoProvider = countryInfoProvider; this.stateInfoProvider = stateInfoProvider; }
public CheckoutController(IShoppingService shoppingService, IContactRepository contactRepository, IProductRepository productRepository, ICheckoutService checkoutService, IPageUrlRetriever pageUrlRetriever, ISKUInfoProvider skuInfoProvider, ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider) { this.shoppingService = shoppingService; this.contactRepository = contactRepository; this.checkoutService = checkoutService; this.productRepository = productRepository; this.pageUrlRetriever = pageUrlRetriever; this.skuInfoProvider = skuInfoProvider; this.countryInfoProvider = countryInfoProvider; this.stateInfoProvider = stateInfoProvider; }
//DocSection:Constructor /// <summary> /// Initializes a instances of services required to manage the checkout process. /// </summary> public CheckoutController(IShoppingService shoppingService, IPaymentOptionInfoProvider paymentOption, IShippingOptionInfoProvider shippingOption, ISKUInfoProvider skuInfo, IAddressInfoProvider addressInfo, ICountryInfoProvider countryInfo, IStateInfoProvider stateInfo, IPageRetriever pageRetriever, IPageUrlRetriever pageUrlRetriever) { this.shoppingService = shoppingService; this.pageRetriever = pageRetriever; this.pageUrlRetriever = pageUrlRetriever; this.skuInfo = skuInfo; this.paymentOption = paymentOption; this.shippingOption = shippingOption; this.addressInfo = addressInfo; this.countryInfo = countryInfo; this.stateInfo = stateInfo; }
public OrderAddressViewModel(OrderAddressInfo address, ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider) { if (address == null) { return; } if (countryInfoProvider == null) { throw new ArgumentNullException(nameof(countryInfoProvider)); } if (stateInfoProvider == null) { throw new ArgumentNullException(nameof(stateInfoProvider)); } AddressLine1 = address.AddressLine1; AddressLine2 = address.AddressLine2; AddressCity = address.AddressCity; AddressPostalCode = address.AddressZip; AddressState = stateInfoProvider.Get(address.AddressStateID)?.StateDisplayName ?? String.Empty; AddressCountry = countryInfoProvider.Get(address.AddressCountryID)?.CountryDisplayName ?? String.Empty; }
/// <summary> /// Initializes a new instance of the <see cref="KenticoCountryRepository"/> class. /// </summary> /// <param name="countryInfoProvider">Provider for <see cref="CountryInfo"/> management.</param> /// <param name="stateInfoProvider">Provider for <see cref="StateInfo"/> management.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="countryInfoProvider"/> or <paramref name="stateInfoProvider"/> is null.</exception> public KenticoCountryRepository(ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider) { this.countryInfoProvider = countryInfoProvider ?? throw new ArgumentNullException(nameof(countryInfoProvider)); this.stateInfoProvider = stateInfoProvider ?? throw new ArgumentNullException(nameof(stateInfoProvider)); }
public CountryRepository(ICountryInfoProvider countryInfoProvider) { _countryInfoProvider = countryInfoProvider ?? throw new ArgumentNullException(nameof(countryInfoProvider)); }
/// <summary> /// Initializes a new instance of the <see cref="CountryRepository"/> class. /// </summary> /// <param name="countryInfoProvider">Provider for <see cref="CountryInfo"/> management.</param> /// <param name="stateInfoProvider">Provider for <see cref="StateInfo"/> management.</param> public CountryRepository(ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider, RepositoryCacheHelper repositoryCacheHelper) { this.countryInfoProvider = countryInfoProvider; this.stateInfoProvider = stateInfoProvider; this.repositoryCacheHelper = repositoryCacheHelper; }