Simon
Simon

Reputation: 25983

How do I get a list of event handlers with nonstandard names in my code?

I'm in the middle of performing a large refactoring which will involve renaming a lot of events. This will leave our code with a lot of code like this:

thing.NewEventName += thing_OldEventName;

How do I get a list of event handlers with nonstandard names in my code? Should I be thinking about a regex search, or should I be looking at writing something using CodeDom?

Upvotes: 1

Views: 198

Answers (1)

Yann Schwartz
Yann Schwartz

Reputation: 5994

You could take a look at Cecil ( http://www.mono-project.com/Cecil ), a library enabling you to look in your IL code, or fire up NDepend ( http://www.ndepend.com ) (which itself uses Cecil) that offers amazing query capabilities over your code base.

Upvotes: 4

Related Questions