예제 #1
0
 /// <summary>
 /// Returns a validator representing the validation criteria specified for type <typeparamref name="T"/>
 /// through configuration for the supplied ruleset.
 /// </summary>
 /// <typeparam name="T">The type to get the validator for.</typeparam>
 /// <param name="ruleset">The name of the required ruleset.</param>
 /// <returns>The validator.</returns>
 /// <exception cref="ArgumentNullException">when the <paramref name="ruleset"/> is <see langword="null"/>.</exception>
 public static Validator <T> CreateValidatorFromConfiguration <T>(string ruleset)
 {
     return(DefaultConfigurationValidatorFactory.CreateValidator <T>(ruleset));
 }
예제 #2
0
 /// <summary>
 /// Returns a validator representing the validation criteria specified for type <paramref name="targetType"/>
 /// through configuration for the supplied ruleset, retrieving configuration information from
 /// the default configuration source.
 /// </summary>
 /// <param name="targetType">The type to get the validator for.</param>
 /// <param name="ruleset">The name of the validation ruleset.</param>
 /// <returns>The validator.</returns>
 public static Validator CreateValidatorFromConfiguration(Type targetType, string ruleset)
 {
     return(DefaultConfigurationValidatorFactory.CreateValidator(targetType, ruleset));
 }
예제 #3
0
 /// <summary>
 /// Returns a validator representing the validation criteria specified for type <typeparamref name="T"/>
 /// through configuration for the default ruleset.
 /// </summary>
 /// <typeparam name="T">The type to get the validator for.</typeparam>
 /// <returns>The validator.</returns>
 public static Validator <T> CreateValidatorFromConfiguration <T>()
 {
     return(DefaultConfigurationValidatorFactory.CreateValidator <T>());
 }