/// <summary> /// Validates that the parameter is not null or empty. Otherwise, an <see cref="ArgumentNullException" /> or <see cref="ArgumentException" /> is thrown. /// </summary> /// <typeparam name="TParameter">The parameter type.</typeparam> /// <param name="validator">The <see cref="ParameterValidator{TParameter}" />.</param> /// <param name="exceptionMessage">The exception message.</param> /// <returns>The same instance of <see cref="ParameterValidator{TParameter}" />.</returns> /// <exception cref="ArgumentNullException">Thrown when the parameter is null.</exception> /// <exception cref="ArgumentException">Thrown when the parameter is empty.</exception> public static ParameterValidator <TParameter> IsNotNullOrEmpty <TParameter>(this ParameterValidator <TParameter> validator, string exceptionMessage) where TParameter : IEnumerable { return(validator.IsNotNull(exceptionMessage) .IsNotEmpty(exceptionMessage)); }