views:

1672

answers:

3

Hello

I have this kind of code in some applications (from microsoft)

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(
  "Microsoft.Naming", 
  "CA1702:CompoundWordsShouldBeCasedCorrectly", 
  MessageId = "CounterClockwise", 
  Scope = "member", 
  Target = "ScePhotoViewer.PhotoDisplayControl.#RotatePhotoCounterClockwiseCommand"
)]

*Can anyone explain me this ? *Is there any blog explaining how to use it, the real benefits... Thanks Jonathan

+4  A: 

This attribute is used by Team Foundation Server's (TFS) code analysis functionality to exclude code fragments that would otherwise trigger warnings. You can safely remove them if you're not using TFS code analysis.

The attributes can be added by hand or, more usually, are added automatically via the Visual Studio GUI when the "Suppress Message" option is selected in the error list.

Stu Mackellar
A: 

So it is not an attribute that can boost my application performance?

I thought it was a microsoft killer attribute to boost WPF application by removing some internals code emits...

It means that i should not add those to my application Thanks anyway.

+1  A: 

This attribute simply suppresses the generation of the specified warning messages during code analysis by TFS. No code is is excluded.

Patman