/// <summary> /// This member supports the Enterprise Library infrastructure and is not intended to be used directly from your code. /// </summary> public Validator CreateValidatorForRule(Type type, ValidationRulesetData ruleData) { return CreateValidator(new ConfigurationValidatedType(ruleData, type)); }
/// <summary> /// This member supports the Enterprise Library infrastructure and is not intended to be used directly from your code. /// </summary> public Validator CreateValidatorForType(Type type, ValidationRulesetData ruleData) { if (ruleData == null) throw new ArgumentNullException("ruleData"); if (ruleData.Validators.Count == 0) return null; ConfigurationValidatedType validatedElement = new ConfigurationValidatedType(ruleData, type); return CreateValidatorForValidatedElement(validatedElement, this.GetCompositeValidatorBuilderForType); }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurationValidatedType"/> class for a ruleset on a /// target type. /// </summary> /// <param name="ruleData">The validation rules corresponding to a ruleset.</param> /// <param name="targetType">The target type.</param> public ConfigurationValidatedType(ValidationRulesetData ruleData, Type targetType) { this.ruleData = ruleData; this.targetType = targetType; }