Consistency: Chains a call to NotNullSee original GitHub issue
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.
Requires.NotNullOrEmpty we don’t do that and instead, call
NotNull. Should we change this so it’s consistent?
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top GitHub Comments
I can change them to call
NotNull and add a
I don’t know how to validate what the JIT inlines, though, short of looking at the compiled code in something like JustDecompile…or is that what you’re thinking of?
I’ll submit a separate PR for this, and then once it gets approved will submit one to vs-validation. That way, any changes that might be needed can be done here first and the PR to vs-validation ends up being cleaner.
Nice. I didn’t know the ETW events included explanations. I’ll have to check that out.