I have implemented add-in for Reflector which detects possible deadlocks in .Net applications. More information is available here:
http://www.garret.ru/CSLint/readme.htm
Sources of CSlint can be downloaded here:
http://www.garret.ru/cslint-201.zip
I wonder if your company is interested in this add-on and add it to the list of Reflector add-ins available at your site.
I have also few questions about .Net reflector. I tried to contact Lutz Roeder directly but didn't succeed. So my questions are:
1. Is there some way in .Net Reflector to access debug information? Actually I need to get source file path and line number of the arbitrary IExpression or IStatement.
2. I don't find some convenient way to iterate through Reflector representation of the code. There is ILanguageWriter interface, but this is just an interface - I have to provide all methods of this interface.
What I need - it to be able to traverse Reflector abstract syntax tree (AST) and perform some special processing for some kind of nodes.
In CSLint I need to have only lock statements and method calls.
So I have to write my own traverse method:
void processStatement(IStatement stmt)
{
if (stmt is IBlockStatement)
{
foreach (IStatement s in ((IBlockStatement)stmt).Statements)
{
processStatement(s);
}
}
else if (stmt is IWhileStatement)
{
processExpression(((IWhileStatement)stmt).Condition);
processStatement(((IWhileStatement)stmt).Body);
}
...
and so on... An in the same weay I am handling expressions.
I winder why there is no standard AST iterator in the Reflector from which I can derive my own class and only redefine methods processMethodInvocationExpression and processLockStatement (or may be just processExpression and processStatement, but the main idea is that I do not have to write all iteration logic myself). It seems to be useful in many different add-ins.
May be I just do not notice right class (because of lack of documentation)?
3. Right now CSLint add-in reports information about detected deadlocks just as plain text using IWindowManager.ShowMessage method.
Ideally I will prefer to output hierarchical messages: list of deadlocks, clicking on which item, use will get list of method invocations and resource locks which cause this deadlock and clicking on particular invocation or lock statement will show correspondent place in source code. I wonder if such report can be implemented in Reflector Add-In.
Please excuse me - I have not so much experience in UI development.
Sources of CSlint can be downloaded here: http://www.garret.ru/cslint-201.zip
I wonder if your company is interested in this add-on and add it to the list of Reflector add-ins available at your site.
I have also few questions about .Net reflector. I tried to contact Lutz Roeder directly but didn't succeed. So my questions are:
1. Is there some way in .Net Reflector to access debug information? Actually I need to get source file path and line number of the arbitrary IExpression or IStatement.
2. I don't find some convenient way to iterate through Reflector representation of the code. There is ILanguageWriter interface, but this is just an interface - I have to provide all methods of this interface.
What I need - it to be able to traverse Reflector abstract syntax tree (AST) and perform some special processing for some kind of nodes.
In CSLint I need to have only lock statements and method calls.
So I have to write my own traverse method:
void processStatement(IStatement stmt)
{
if (stmt is IBlockStatement)
{
foreach (IStatement s in ((IBlockStatement)stmt).Statements)
{
processStatement(s);
}
}
else if (stmt is IWhileStatement)
{
processExpression(((IWhileStatement)stmt).Condition);
processStatement(((IWhileStatement)stmt).Body);
}
...
and so on... An in the same weay I am handling expressions.
I winder why there is no standard AST iterator in the Reflector from which I can derive my own class and only redefine methods processMethodInvocationExpression and processLockStatement (or may be just processExpression and processStatement, but the main idea is that I do not have to write all iteration logic myself). It seems to be useful in many different add-ins.
May be I just do not notice right class (because of lack of documentation)?
3. Right now CSLint add-in reports information about detected deadlocks just as plain text using IWindowManager.ShowMessage method.
Ideally I will prefer to output hierarchical messages: list of deadlocks, clicking on which item, use will get list of method invocations and resource locks which cause this deadlock and clicking on particular invocation or lock statement will show correspondent place in source code. I wonder if such report can be implemented in Reflector Add-In.
Please excuse me - I have not so much experience in UI development.