Beispiel #1
0
 public ProductListUploadController(AppDBContext appDBContext, IProductList productRepo, ICommonItems commonItemsRepo, IPermittedAdditives permittedAdditivesRepo)
 {
     this._appDBContext           = appDBContext;
     this._productRepo            = productRepo;
     this._permittedAdditivesRepo = permittedAdditivesRepo;
     this._commonItemsRepo        = commonItemsRepo;
 }
Beispiel #2
0
        public CommandShould()
        {
            _ProductList = Mock.Of <IProductList>
                           (
                productList =>
                productList.Name == "WishList" &&
                productList.Products == (new List <IProduct>())
                           );

            _productInvoker = new ProductCommandInvoker();
        }
Beispiel #3
0
 public ProductServices(IProductCreate productCreate,
                        IProductEdit productEdit,
                        IProductDelete productDelete,
                        IProductGet productGet,
                        IProductList productList)
 {
     this.productCreate = productCreate;
     this.productEdit   = productEdit;
     this.productDelete = productDelete;
     this.productGet    = productGet;
     this.productList   = productList;
 }
Beispiel #4
0
        protected virtual IProductList GetPromotedProducts(string itemId)
        {
            IProductList productList = (IProductList)null;

            if (string.IsNullOrEmpty(itemId))
            {
                return(productList);
            }
            Item obj = Context.Database.GetItem(new ID(itemId));

            if (obj.TemplateName.Equals(Sitecore.Commerce.XA.Foundation.Common.Constants.DataTemplates.NamedSearch.Name))
            {
                productList = (IProductList) new Sitecore.Commerce.XA.Feature.Catalog.Models.ProductLists.NamedSearch(this.StorefrontContext, obj, this.SearchManager, this.ModelProvider);
            }
            else if (obj.TemplateName.Equals(Sitecore.Commerce.XA.Foundation.Common.Constants.DataTemplates.SelectedProducts.Name))
            {
                productList = (IProductList) new Sitecore.Commerce.XA.Feature.Catalog.Models.ProductLists.SelectedProducts(this.StorefrontContext, obj, this.SearchManager, this.ModelProvider);
            }
            return(productList);
        }
 public HomeController(IProductList productList)
 {
     _productList = productList;
 }
Beispiel #6
0
 public RemoveCommand(IProductList productList, IProduct product)
 {
     _productList = productList;
     _product     = product;
 }
Beispiel #7
0
 public ProductController(IProductList productList)
 {
     _productList = productList;
 }
Beispiel #8
0
 public ClearCommand(IProductList productList)
 {
     _productList = productList;
 }
Beispiel #9
0
 public AddCommand(IProductList productList, IProduct product)
 {
     _productList = productList;
     _product     = product;
 }
 public PriceFileGenerator(IProduceFileParser produceFileParser, IProductList productList)
 {
     _produceFileParser = produceFileParser;
     _productList       = productList;
 }
 public ProductListPresenter(IProductList productList)
 {
     this.productList = productList;
 }