Exemple #1
0
 /// <summary>
 /// Validates that the parameter is empty. Otherwise, an <see cref="System.ArgumentException" /> is thrown.
 /// </summary>
 /// <typeparam name="TParameter">The parameter type.</typeparam>
 /// <param name="validator">The <see cref="ParameterValidator{TParameter}" />.</param>
 /// <returns>The same instance of <see cref="ParameterValidator{TParameter}" />.</returns>
 /// <exception cref="System.ArgumentException">Thrown when the parameter is not empty.</exception>
 public static ParameterValidator <TParameter> IsEmpty <TParameter>(this ParameterValidator <TParameter> validator)
     where TParameter : IEnumerable
 {
     return(validator.IsEmpty(ExceptionMessages.VALUE_MUST_BE_EMPTY));
 }
 /// <summary>
 /// Validates that the parameter is empty. Otherwise, an <see cref="System.ArgumentException" /> is thrown.
 /// </summary>
 /// <param name="validator">The <see cref="ParameterValidator{TParameter}" />.</param>
 /// <returns>The same instance of <see cref="ParameterValidator{TParameter}" />.</returns>
 /// <exception cref="System.ArgumentException">Thrown when the parameter is not empty.</exception>
 public static ParameterValidator <string> IsEmpty(this ParameterValidator <string> validator)
 {
     return(validator.IsEmpty(ExceptionMessages.VALUE_CANNOT_BE_EMPTY));
 }