c#/.net/fxcop!
... within a class, I want FxCop to shut up complaining about
Warning CA1062 : Microsoft.Design :
In externally visible method 'xyz', validate parameter 'a' before using it.
Basically, this rule suggests that I put a if (a == null) throw new ArgumentNullException("a");
at the start of almost every method in my code. This sucks and changes the exception handling logic.
So, I put this somewhere into my class body:
[SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods",
Scope = "Type",
MessageId = "0",
Justification = "We love danger... so far.")]
Anyway, this does not even suppress a single message - I still get all these warnings. It only suppresses the warning if it stands right above one of the fallible method definitions (i.e. it only supresses one single warning, not all of this type). The odd thing is that the same syntax works for other issues that occur multiple times in my class.
I don't know what I'm doing wrong, and I frankly don't really understand how to use the attribute parameters.. http://msdn.microsoft.com/de-de/library/ms244717.aspx doesn't go too much into details. :T ... anyway, any ideas what's not right?