I have inherited a large c# codebase. Its very messy and I suspect it might have various thread safety issues. One thing I want to do is find all static data in it. I know I could craft various regex search etc but it seems that an IL inspection tool could do a better job.
Does anybody know if such a tool exists. I have dotPeek and it doesnt, dont think reflector does it. In fact a general tool for finding all sorts of info about IL. Maybe fxcop rule could be written, i dont know enough about fxcop
EDIT: the code has > 2000 static methods so searching for ‘static’ is a pain. And I am worried that fancy regexes might miss something
And I also could absolutely write my own mini tool to do it. I just wondered if there is already a tool to do it
It’s pricey, but NDepend might suit your needs. I’ve used it before and have nothing but nice things to say about it.
It offers many kinds of code inspection and a domain-specific language (CQL) for querying code. If it’s not already built-in, I’m certain you could write a simple query to find static methods.