Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }