in src/Microsoft.VisualStudio.Validation/Requires.cs [156:175]
public static void NotNullOrWhiteSpace([ValidatedNotNull, NotNull] string value, string? parameterName)
{
// To whoever is doing random code cleaning:
// Consider the performance when changing the code to delegate to NotNull.
// In general do not chain call to another function, check first and return as earlier as possible.
if (value is null)
{
throw new ArgumentNullException(parameterName);
}
if (value.Length == 0 || value[0] == '\0')
{
throw new ArgumentException(Format(Strings.Argument_EmptyString, parameterName), parameterName);
}
if (string.IsNullOrWhiteSpace(value))
{
throw new ArgumentException(Strings.Argument_Whitespace, parameterName);
}
}