Пример #1
0
        /// <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>
        /// 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);
        }