I have a fluent, extensible validation helper like:
Assert.That(aParameter).IsNotNull();
It is extensible because the That method is actually generic (That<T>) and uses implicit typing to return a generic IAssertCondition<T> object. IsNotNull is actually an extension method.
Anyway, the problem using this approach to validate the parameters passed into a method is that I get CA1062 warnings instructing me to validate the arguments before using them which, of course, I am already doing.
I read Eric Smith's post (here) about using a ValidatedNotNullAttribute to inform FxCop that the argument is being validated but I don't see how I can accomplish this using the fluent interface I've described.
What are my options so that Code Analysis will recognize that the above statement satisfies the requirements and the warning will not appear?