Question

I would like to find out all classes that have an inline SQL Statement in them. How do you write an NDepend CQL query that scans the method body looking for the use of say "Select"? Is it possible?

Thanks in Advance.

Was it helpful?

Solution

NDepend is more about code structure, code quality, code metrics, code diff ... It doesn't know about string constants content, so this is not the right tool for what you need to do.

For that I'd advise using Mono.Cecil which is an assembly content reader API (OSS/free) pretty well done! Btw NDepend relies on Cecil for reading assemblies and I can say it is a great API with high performances and pretty close to bug free!.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top