Closed CraigHawker closed 1 year ago
"Ensure" sounds a bit imperative to me. What about AsNotNull
or ToNotNull
? NullToEmpty
would be more explicit. Too much so?
I think I have often seen the "Is" put in front of the name in functions like this. How would IsCurrentUserSystemProcess
sound to you?
"Ensure" sounds a bit imperative to me. What about
AsNotNull
orToNotNull
?NullToEmpty
would be more explicit. Too much so?I think I have often seen the "Is" put in front of the name in functions like this. How would
IsCurrentUserSystemProcess
sound to you?
Good call on both. Changed in 2d55a0aa94007554cd83c1beb8dd25ce8fc37f5d.
Added if the collection is null.
IEnumerableExtensionMethods.EnsureNotNull()
. Returns the collection passed (if not null), or returns Enumerable.EmptyAdded
EnvironmentBase.CurrentUserIsSystemProcess()
Returns true if the user ID is equal to or less than zero, or false if the user ID is a valid user ID.Added unit tests for above.