We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55b5f56 commit a95a580Copy full SHA for a95a580
src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer/Guard.cs
@@ -40,11 +40,11 @@ public static void NotNullNorEmpty<T>([CanBeNull] [ItemCanBeNull] IEnumerable<T>
40
[ContractAnnotation("value: null => halt")]
41
public static void NotNullNorWhiteSpace([CanBeNull] string value, [NotNull] [InvokerParameterName] string name)
42
{
43
- NotNull(value, name);
44
-
45
if (string.IsNullOrWhiteSpace(value))
46
47
- throw new ArgumentException($"'{name}' cannot be empty or contain only whitespace.", name);
+ NotNullNorEmpty(value, name);
+
+ throw new ArgumentException($"'{name}' cannot contain only whitespace.", name);
48
}
49
50
0 commit comments