private void Add <TProperty>( string groupName, Expression <Func <TModel, TProperty> > property, LambdaExpression rule, LambdaExpression enabled, DryvRuleLocation ruleLocation) { var ruleDefinition = DryvCompiledRule.Create(property, rule, enabled, ruleLocation, groupName); this.PropertyRules.Add(ruleDefinition); }
private void Disable <TProperty>( Expression <Func <TModel, TProperty> > property, LambdaExpression rule, LambdaExpression enabled, DryvRuleLocation ruleLocation) { var ruleDefinition = DryvCompiledRule.Create(property, rule, enabled, ruleLocation, null); ruleDefinition.IsDisablingRule = true; this.DisablingRules.Add(ruleDefinition); }