Exemplo n.º 1
0
 /// <summary>
 /// Facilitates Registering a RuleValidator on the PropertyValidator
 /// </summary>
 /// <param name="validator"><see cref="RuleValidator&lt;T, TProperty&gt;"/></param>
 /// <returns><see cref="IRuleBuilder&lt;T, TProperty&gt;"/></returns>
 IRuleBuilder <T, TProperty> IRuleBuilder <T, TProperty> .RegisterValidator(RuleValidator <T, TProperty> validator)
 {
     validator.Negate = _negate;
     if (OrNextRule)
     {
         _propertyValidator.OrRule(validator);
         OrNextRule = false;
     }
     else
     {
         _propertyValidator.AndRule(validator);
     }
     return(this);
 }