开发者

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 leav开发者_如何学JAVAe 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜