Parsing method body

Hi
I am trying to parse a method body in a custom rule for FXCOP and filter some words.
e.g.
void SomeMethod()
{
statement1;
statement2;
statement3;
}
Themethod.Body.StatementsIdea does not contain the text of the statement.
Is there any other method to get the result?
Thanks
[438 byte] By [smartneraj] at [2008-2-6]
# 1
FxCop is a binary checker. The abstract syntax trees exposed by Method.Body are raised from IL. So, any information that's directly tied to source is lost. We are considering adding a source-based analysis in the future, but unfortunately it does not exist today.

Michael Fanning
VSTS Development: Code Analysis

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 2
Thanks .
This means I can not filter some words and/or phrases from my code base by designing a rule, at present,right?
Rajan
smartneraj at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 3
That is correct. If you need to perform source-based analysis, you could consider writing a VS add-in and using the C# code model to do the work you're interested in.

Michael

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified