开发者

how to do a "Move type to another file to match its name" accross a complete solution

does anyone know of a way to split all classes in one solution into multiple files?

The point here is that I've inherited a 开发者_StackOverflowproject in which a few hundred files contain a thousand or so classes... I'd like to be able to get to a 1 file per class approach..

Using resharper I can easily do this manually, but I'm guessing there must be a better way?

Kind regards

Frederik


You could try one of the ReSharper 5.0 nightly builds which allow you to do it across your whole solution. You can revert to ReSharper 4.5 (or whatever version you are using) afterwards.


GraemeF's answer is correct, but when you do that refactoring chances are you'll lose all source-control history for the existing classes. This might not be a problem for you (especially if the system you've inherited wasn't source-controlled!) but I've often found that line-annotated views of a class are very helpful for determining the intent behind a particular line.

ReSharper has the Ctrl-T shortcut to jump to a type name, and holding down Ctrl makes types clickable; that might be another way to solve your problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜