/// <summary>
 ///
 /// </summary>
 /// <param name="type"></param>
 /// <param name="propertyInfo"></param>
 /// <param name="ruleset"></param>
 /// <param name="validationSpecificationSource"></param>
 /// <param name="memberValueAccessBuilder"></param>
 /// <returns></returns>
 public static Validator GetPropertyValidator(Type type,
                                              PropertyInfo propertyInfo,
                                              string ruleset,
                                              ValidationSpecificationSource validationSpecificationSource,
                                              MemberValueAccessBuilder memberValueAccessBuilder)
 {
     // TODO should pass along validator factory?
     return(GetPropertyValidator(type,
                                 propertyInfo,
                                 ruleset,
                                 validationSpecificationSource,
                                 new MemberAccessValidatorBuilderFactory(memberValueAccessBuilder)));
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="valueAccessBuilder"></param>
 public MemberAccessValidatorBuilderFactory(MemberValueAccessBuilder valueAccessBuilder)
 {
     this.valueAccessBuilder = valueAccessBuilder;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="valueAccessBuilder"></param>
 public MemberAccessValidatorBuilderFactory(MemberValueAccessBuilder valueAccessBuilder)
 {
     this.valueAccessBuilder = valueAccessBuilder;
 }
 public Validator CreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder, ValidatorFactory ignored)
 {
     return(new ValidationAttributeValidator(this.attributes));
 }
 public Validator CreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder, ValidatorFactory ignored)
 {
     return new ValidationAttributeValidator(this.attributes);
 }