public static void StringRequiredAndNotWhitespace(string parameter, string parameterName) { ParameterNameRequired(parameterName); Require(!string.IsNullOrWhiteSpace(parameter), string.Format("The string parameter {0} must not be null, empty or contain only whitespace", parameterName)); }