Inheritance: System.Configuration.ConfigurationValidatorBase
Exemplo n.º 1
0
        private static ConfigurationValidatorBase GetValidator(MemberInfo mi)
        {
            ConfigurationValidatorBase validator = new DefaultValidator();
            var validators = mi.GetAttributes <ValidationAttribute>();

            if (validators.IsNullOrEmpty() == false)
            {
                validator = new CompositeConfigurationValidator(validators, mi.Name);
            }
            return(validator);
        }
 private static ConfigurationValidatorBase GetValidator(MemberInfo mi)
 {
     ConfigurationValidatorBase validator = new DefaultValidator();
     var validators = mi.GetAttributes<ValidationAttribute>();
     if (validators.IsNullOrEmpty() == false)
     {
         validator = new CompositeConfigurationValidator(validators, mi.Name);
     }
     return validator;
 }