/// <summary> /// Validates that the parameter is not equal to <paramref name="value" />. Otherwise, an <see cref="ArgumentException" /> is thrown. /// </summary> /// <param name="validator">The <see cref="ParameterValidator{TParameter}" />.</param> /// <param name="value">The value the parameter must not be equal to.</param> /// <param name="ignoreCase">Whether or not to ignore case.</param> /// <returns>The same instance of <see cref="ParameterValidator{TParameter}" />.</returns> /// <exception cref="System.ArgumentException">Thrown when parameter is equal to <paramref name="value" />.</exception> public static ParameterValidator <string> IsNotEqualTo(this ParameterValidator <string> validator, string value, bool ignoreCase) { if (value != null) { string exceptionMessage = string.Format(ExceptionMessages.VALUE_MUST_NOT_BE_EQUAL_TO, value); return(validator.IsNotEqualTo(value, ignoreCase, exceptionMessage)); } return(validator); }