Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for the LearningProductTypeController class.
 /// </summary>
 public LearningProductTypeController()
 {
     // Initializes instances of services required to manage product price calculation and the shopping cart
     // For real-world projects, we recommend using a dependency injection container to initialize service instances
     shoppingService   = Service.Resolve <IShoppingService>();
     calculatorFactory = Service.Resolve <ICatalogPriceCalculatorFactory>();
 }
 //DocSection:Controller
 /// <summary>
 /// Constructor for the ProductFilterController class.
 /// </summary>
 public ProductFilterController()
 {
     // Initializes instances of services required to facilitate product filtering
     // For real-world projects, we recommend using a dependency injection container to initialize service instances
     shoppingService   = Service.Resolve <IShoppingService>();
     calculatorFactory = Service.Resolve <ICatalogPriceCalculatorFactory>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes instances of services required to manage product price calculation and the shopping cart.
 /// </summary>
 public ProductListingController(IShoppingService shoppingService,
                                 ICatalogPriceCalculatorFactory priceCalculatorFactory,
                                 IPageRetriever pageRetriever,
                                 IPageUrlRetriever pageUrlRetriever)
 {
     this.shoppingService        = shoppingService;
     this.priceCalculatorFactory = priceCalculatorFactory;
     this.pageRetriever          = pageRetriever;
     this.pageUrlRetriever       = pageUrlRetriever;
 }
 //DocSection:Controller
 /// <summary>
 /// Initializes instances of services required to facilitate product filtering.
 /// </summary>
 public ProductFilterController(IShoppingService shoppingService,
                                ICatalogPriceCalculatorFactory catalogPriceCalculator,
                                IPageUrlRetriever pageUrlRetriever,
                                IPageRetriever pageRetriever)
 {
     this.shoppingService        = shoppingService;
     this.catalogPriceCalculator = catalogPriceCalculator;
     this.pageUrlRetriever       = pageUrlRetriever;
     this.pageRetriever          = pageRetriever;
 }
Ejemplo n.º 5
0
 public CodeSnippets(IShoppingService shoppingService,
                     ICatalogPriceCalculatorFactory catalogPriceCalculatorFactory,
                     ISiteService siteService,
                     IPageDataContextRetriever pageRetriever)
 {
     this.shoppingService = shoppingService;
     this.catalogPriceCalculatorFactory = catalogPriceCalculatorFactory;
     this.siteService   = siteService;
     this.pageRetriever = pageRetriever;
 }
Ejemplo n.º 6
0
 //DocSection:Constructor
 /// <summary>
 /// Constructor for the ProductController class.
 /// </summary>
 public ProductController(IShoppingService shoppingService,
                          ICatalogPriceCalculatorFactory priceCalculatorFactory,
                          IPageDataContextRetriever pageRetriever,
                          ISiteService siteService,
                          ISKUInfoProvider skuInfoProvider)
 {
     // Initializes instances of services required to manage product price calculation and the shopping cart
     this.shoppingService        = shoppingService;
     this.priceCalculatorFactory = priceCalculatorFactory;
     this.pageRetriever          = pageRetriever;
     this.siteService            = siteService;
     this.skuInfoProvider        = skuInfoProvider;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="shoppingService">Shopping service.</param>
 /// <param name="catalogPriceCalculatorFactory">Catalog price calculator factory.</param>
 public CalculationService(IShoppingService shoppingService, ICatalogPriceCalculatorFactory catalogPriceCalculatorFactory)
 {
     mShoppingService = shoppingService;
     mCatalogPriceCalculatorFactory = catalogPriceCalculatorFactory;
 }
 /// <summary>
 /// Creates an instace of the <see cref="RecommendedProductsPriceCalculator"/> class.
 /// </summary>
 /// <param name="shoppingService">Shopping service.</param>
 /// <param name="catalogPriceCalculatorFactory">Catalog price calculator factory.</param>
 public RecommendedProductsPriceCalculator(IShoppingService shoppingService, ICatalogPriceCalculatorFactory catalogPriceCalculatorFactory)
 {
     this.shoppingService = shoppingService;
     this.catalogPriceCalculatorFactory = catalogPriceCalculatorFactory;
 }