public ValidatorBuilderBase(MemberAccessValidatorBuilderFactory memberAccessValidatorFactory, ValidatorFactory validatorFactory) { _memberAccessValidatorFactory = memberAccessValidatorFactory; _validatorFactory = validatorFactory; }
public Validator CreateValidator(Type targetType, Type ownerType, MemberValueAccessBuilder memberValueAccessBuilder, ValidatorFactory ignored) { return(new ValidationAttributeValidator(attributes)); }
protected internal override Validator InnerCreateValidator(Type targetType, string ruleset, ValidatorFactory mainValidatorFactory) { if (string.IsNullOrEmpty(ruleset)) { var builder = new ValidationAttributeValidatorBuilder(MemberAccessValidatorBuilderFactory.Default, mainValidatorFactory); return(builder.CreateValidator(targetType)); } return(EmptyValidator); }
protected internal abstract Validator InnerCreateValidator(Type targetType, string ruleset, ValidatorFactory mainValidatorFactory);
protected internal override Validator InnerCreateValidator(Type targetType, string ruleset, ValidatorFactory mainValidatorFactory) { Validator validator = GetValidator(_validatorFactories.Select(f => f.InnerCreateValidator(targetType, ruleset, mainValidatorFactory))); return(validator); }
public ValidationAttributeValidatorBuilder(MemberAccessValidatorBuilderFactory memberAccessValidatorFactory, ValidatorFactory validatorFactory) : base(memberAccessValidatorFactory, validatorFactory) { }
public MetadataValidatorBuilder(MemberAccessValidatorBuilderFactory memberAccessValidatorFactory, ValidatorFactory validatorFactory) : base(memberAccessValidatorFactory, validatorFactory) { }