Guard
Guard copied to clipboard
Add ValidatedNotNullAttribute to IsNotNull methods
You can avoid CA1062 popping up by exposing a ValidatedNotNullAttribute in the library and then attributing it on the parameter in IsNotNull method. Probably won't work for expressions, but will work when the actual parameter is provided.
See http://esmithy.net/2011/03/15/suppressing-ca1062/