Exemple #1
0
 public CompoundValidator(
     IProductCategorizer productCategorizer,
     IProductHelper productHelper,
     IRuleValidationEngine validator)
 {
     this.productCategorizer = productCategorizer;
     this.productHelper      = productHelper;
     this.validator          = validator;
 }
Exemple #2
0
        public ProductDataValidator(
            IRuleValidationEngine validator,
            IProductCategorizer productCategorizer,
            ICollection <string> productsList)
        {
            if (productsList == null)
            {
                throw new ArgumentNullException("productsList");
            }

            this.validator          = validator;
            this.productCategorizer = productCategorizer;
            this.productsList       = productsList;
        }
        public QueryInterpreter(
            IProductCategorizer productCategorizer,
            IProductHelper productHelper,
            ICompoundValidator validator,
            IDictionary <string, string> intergalacticProductsCache,
            IDictionary <string, decimal> earthyProductsCache)
        {
            if (intergalacticProductsCache == null)
            {
                throw new ArgumentNullException("intergalacticProductsCache");
            }

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

            this.productCategorizer         = productCategorizer;
            this.productHelper              = productHelper;
            this.validator                  = validator;
            this.intergalacticProductsCache = intergalacticProductsCache;
            this.earthyProductsCache        = earthyProductsCache;
        }