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.
Refactoring: Extract method into a class
1.3k Views Asked by epitka At
2
There are 2 best solutions below
0
user527342
On
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.
Related Questions in REFACTORING
- FluentValidation NotEmpty and EmailAddress example
- refactor 'execute and log' pattern
- Combining a few methods into the only one. Generics
- Recfactoring duplication of codes without adding complexity?
- Refactor some calls on each Zf2 controller action
- Nesting anonymous delegates in C# - how to make code maintainable and readable?
- Is there a data structure or design pattern or code structure to avoid multiple if statements?
- How to refactor this code to remove duplicate code
- Eclipse JDT Refactor method programatically fails in subclass
- How to refactor this LINQ query
- Refactor/Move String to App.Config Key
- How do I compress this duplicate code and make it dynamic?
- How do I extract code into a static method in Eclipse, passing fields as parameters?
- Extract methods with return statements
- Clean up chain of dependent calls
Related Questions in RESHARPER
- Assignment in conditional expressions - what are the potential code quality consequences of this?
- How can I integrate ReSharper's Dotsettings File in SonarQube?
- Multiple methods in replace pattern
- ReSharper is extremely slow with JavaScript files
- Include single quote (apostrophe) in a template's constant value parameter
- Resharper method call "At end of line" formatting style
- Where is the regular expression syntax highlighting information stored for inline strings in Resharper 9?
- resharper is not ignoring tests marked with Category Attribute in XUnit
- Refactor/Move String to App.Config Key
- Is there a way to generate the INotifyPropertyChanged helper with Resharper after having implemented the interface?
- Find usages for methods resolved to a certain type in Resharper and/or Visual Studio
- I cannot debug two projects at once - one with Resharper NUnit tests
- ReSharper claims various members are unused, when they are actually used as Model members in cshtml views
- How to run nunit tests with asp.net 5 projects, especially with ReSharper?
- Is this a bug in resharper?
Related Questions in CODERUSH
- Unable to run xUnit Test with Code Rush runner in VS 2012 without an exception
- CodeRush QuickPair remove
- Coderush and Productivity Power Tools overlapped functionality
- I am having problems installing any VSIX package into my computer
- Coderush express seems doesn't work
- Coderush code clean up settings
- Delete a specific file with a shortcut key
- Intellisense broken after installing CodeRush Devexpress
- What complex refactoring features do you wish there were?
- Disable CodeRush
- CodeRush - Do That Suggested Fix - (shortcuts)
- Uninstall of CodeRush and ReSharper - Intellisense Not Working
- Is there something like CodeRush from Java?
- How can I change the template CodeRush uses when it extracts a method?
- As "private" is the default scope in C# - should the word "private" be removed from signatures for cleaner code?
Related Questions in CODERUSH-XPRESS
- Coderush xpress (11.2.11) not working in VS2010
- Disable CodeRush
- Coderush Xpress commercial using
- Making CodeRushXpress-11.2.13 work with Visual Studio 2013
- Code Formatting and Intellassist
- Type of window
- Cheat Sheet for CodeRush Xpress for VS 2010?
- CodeRush Xpress with JustCode on VS 2010
- How to rearrange class members using Coderush Express
- CodeRush Xpress: disable the locator carets?
- Visual Studio Format entire file?
- Can I use CodeRush Xpress in Visual Studio 2010?
- keyboard shortcut for viewing/applying available refactorings
- Is CodeRush Xpress compatible with Visual Studio 2012
- Visual Studio 2010 IntelliSense doesn't select a default value - it just marks it
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is an
Extract classrefactoring 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.