Is there a tool that would allow me to extract methods into classes without much manual work? I need this on massive scale, 100's of methods.
Asked
Active
Viewed 1,226 times
0
-
2CodeRush does it well. R# very likely does it well. Give us an example or download both evals. Doing 100s as a bulk job without a direct benefit may not actually move your customer or codebase forward. – Ruben Bartelink Apr 02 '13 at 20:29
-
Methods are already in classes. What specifically do you want to do? – AakashM Apr 03 '13 at 08:01
-
@AAkasM: These methods are in services that are taking too many dependencies, methods are defacto command handlers and should be treated as such. – epitka Apr 03 '13 at 13:04
2 Answers
1
There is an Extract class
refactoring in ReSharper 7.0. You can choose which methods would go into extracted class. But you cannot extract 100 classes at once by clicking one button. I doubt that there is a tool that can do this. But you can always try to write a plugin for ReSharper for this task.

Dmitry Osinovskiy
- 9,999
- 1
- 47
- 38
0
Here is how i am able to do it using resharper: Place the Caret in the method name, bring up the resharper menu (Ctrl+Shift+R), select "Move to another Type" and this will open a dialog that will help you to locate the "transfer to location".
Optionally, if you are using resharpers default shortcuts in visual studio, just place the caret in the method name and press F6.