public DiscountRule(PromotionConfig rule) { RuleModel = rule; ConditionValidator = new ProductValidator(); Hashtable hash = JsonConvert.DeserializeObject <Hashtable>(rule.Config); ConditionValidator.InitData(hash); }
public IList <OrderProduct> GetProducts(DiscountParameter parameter) { ProductValidator productValidator = ConditionValidator as ProductValidator; return(productValidator.GetProducts(parameter)); }