コード例 #1
0
        public Validator CreateValidatorForType(Type type, ValidationRulesetData ruleData)
        {
            if (ruleData.Validators.Count == 0)
            {
                return(null);
            }

            ConfigurationValidatedType validatedElement = new ConfigurationValidatedType(ruleData, type);

            return(CreateValidatorForValidatedElement(validatedElement, this.GetCompositeValidatorBuilderForType));
        }
コード例 #2
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);
        }