Exemplo n.º 1
0
        public ValidatorNode(RuleBuilder <TInstance> builder, Func <TInstance, TValue> valueFunction, string propertyKey, string propertyName, IValidator <TInstance, TValue> validator)
        {
            this.builder       = builder;
            this.valueFunction = valueFunction;
            this.propertyKey   = propertyKey;
            this.propertyName  = propertyName;

            Validator = validator;
            Rule      = new ValidatorRule <TInstance, TValue>(propertyKey, propertyName, validator, valueFunction);

            builder.AddRule(Rule);
        }