-
-
Notifications
You must be signed in to change notification settings - Fork 279
Closed
Description
I'd love to be able to get an ArgumentNullException when the value is null and a plain ArgumentException when it simply has some invalid form. My current best practice for this is:
Actions = Guard.Against.InvalidInput(
Guard.Against.Null(actions, nameof(actions)),
nameof(actions), HasNoDuplicates).ToList();
However, it is a bit cumbersome. It'd be nice to have a method that would make it possible to do:
Actions = Guard.Against.NullOrInvalidInput(actions, nameof(actions), HasNoDuplicates).ToList();