In all of the other methods that validate the parameter is not null, we're explicitly testing if (value is null) with a comment that reads
// 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.
However, in Requires.NotNullOrEmpty we don't do that and instead, call NotNull. Should we change this so it's consistent?
|
NotNull(values, parameterName); |
In all of the other methods that validate the parameter is not null, we're explicitly testing
if (value is null)with a comment that readsHowever, in
Requires.NotNullOrEmptywe don't do that and instead, callNotNull. Should we change this so it's consistent?Validation/src/Validation/Requires.cs
Line 249 in 2378284