Programmatically inspect .NET code
.net, c#, code-analysis
Solution
NDepend gives a SQL-like query language for querying .NET code structure.
Problem
I am looking for a way to programmatically inspect a .NET (C#, VB.NET,..) source code to perform static code analysis. I'd like to perform queries on the code such as: - list classes whose name begin by x - list all the subclasses of x - list methods which instanciate an object of class x - determine if method x contains a variable named y - list methods calling the method y - ... What I am looking for is an API or something else allowing me to write programs able to examine a source code.