Refactoring tools for net




















Active 9 years, 9 months ago. Viewed 10k times. Improve this question. DenaliHardtail DenaliHardtail Add a comment. Active Oldest Votes. Improve this answer. Ray Ray It makes nearly impossible refactorings almost trivial and implements a good sense of how code can be improved. Unfortunately, ReSharper doesn't like big solutions, Visual Studio bogs down into an unusable state when I open my class library, even with solution-wide analysis turned off.

DevExpress tools doesn't have that problem though. Resharper can be slow with big solutions. The latest release 4. Even running slowly, I know I can get more done in less time with Resharper.

The performance of ReSharper 4. It is especially useful after the Pull Members Up refactoring. It will take you just a second to create a copy of a type with a different name or within another namespace.

ReSharper will take care of creating a separate file for it. For partial types, all parts will be copied even if they are located in separate files.

This refactoring converts anonymous types to named types in the scope of either the current method locally or the whole solution globally. In the dialog box that this refactoring provides, you can specify whether ReSharper should generate auto-properties or properties with backing fields, and also opt to generate equalify and formatting method overloads.

This refactoring works a lot like Convert Property to Method but it is applied to indexers default properties in VB. You can convert only getter, only setter, or both, to a method. The reverse functionality is provided by Convert Method to Indexer. This is the reverse of Convert Indexer to Method. It works in dialogless mode, but you may have to apply it to two methods to generate both a getter and a setter in your indexer.

This refactoring allows users to convert non-void methods without parameters to properties with read access, and void methods with exactly one parameter to properties with write access. This refactoring helps you convert properties with private backing fields to auto-implemented properties also known as auto-properties. The refactoring removes the backing field and replaces all its usages with the newly created auto-property.

Using this refactoring, properties with read access can be converted to getter-type methods non-void methods without parameters , and properties with write access can be converted to setter-type methods void methods with exactly one parameter.

As to properties allowing both read and write access, you can convert them to pairs of getter- and setter-type methods. Do you have a class doing work that should be really done by two different classes?

Use this refactoring to decompose a complex class into two single-responsibility classes. Extract Class will help you choose methods and fields to move from the old class to the new class. It will also warn of any broken dependencies and accessibility issues and suggest conflict resolution options. This refactoring allows you to create an interface from a class and make that class implement the created interface.

You can choose the members to extract to the interface and specify a name for the interface. Select an expression or a local variable and apply this refactoring. It will create a new field or constant and initialize it with the expression or local variable initializer.

The field can be assigned in its initializer, type constructors or current members. When a field has a single write usage, this refactoring substitutes read usages of the field with its initialization expression, deleting the field declaration and the write usage along the way.

The Encapsulate Field refactoring allows you to quickly create an accessor property from an existing field. Usages of the field are automatically replaced with usages of the property. An apparent advantage of this refactoring is that you can disallow direct access to a field through the use of properties.

Whenever possible, this refactoring is able to transfer a method's body into the body of its callers and remove the method altogether.

The reverse functionality is provided by Extract Method. Select an arbitrary expression inside member code and invoke the Introduce Variable refactoring. A new implicitly or explicitly typed local variable will be declared and initialized with the selected expression. The original expression will be replaced with the name of the variable. Should there be multiple occurrences of the original expression in your code, you will be given an option to replace all of them with the newly created variable.

In the same manner you may also introduce constants for constant expressions. This refactoring helps you move a parameter of a method into its body. For example, if the the same constant value is passed to the method in all its calls, then the parameter can be removed and the corresponding local variable can be added in the method body. Select an arbitrary variable or local constant and invoke the 'Inline Variable' refactoring.

All occurrences of the selected variable in your code will be substituted with its initializer. The reverse functionality is provided by Introduce Variable. This refactoring helps you quickly move a part of a string to a separate variable.

Net platform. It's purpose is to ease testing by allowing the developer to create mock implementations of custom objects and verify the interactions using unit testing. Mocks is an attempt to create easier way to build and use mock objects and allow better refactoring support from the current tools.

Net's model and NMock's expectation based model. Mocks originated from EasyMock. Net and attempt to improve on their model to create easy to use and power mocking framework.

It's free for use and modification for open source and commercial software. RMock 2. RMock has support for a setup-modify-run-verify workflow when writing jUnit tests. It integrates better with IDE refactoring support and allows designing classes and interfaces in a true test-first fashion. It can be used to analyze large projects and detect code that has been cloned e.

In addition to identifying the code clone fragments, SolidSDD offers an intuitive graphical interface for assessing the code duplication characteristics and the location of the duplicated fragments in the code stack. This interface enables developers, architects and software managers to better manage the process of refactoring by assessing the required effort and establishing refactoring priorities. The tool is designed to facilitate and improve database development, administration, and maintenance.

It can help development teams and database administrators to enforce common coding standards and best practices, identify problems early in the project lifecycle, implement automatic code reviews and improve their overall productivity. The Intuitive visual tool allows the snapshotting of DB structure, and comparison of databases and their synchronization. The work of the visual tool in the wizard mode provides a user-friendly interface which allows quick saving of DB snapshots and synchronization.

Thus, you save money on the licenses for your end users, staff training and obtain a powerful component with a set of advanced features.

The SQL Schema Sync API allows you to compare database structures, to easily update them, use data refactoring and specify exact objects to be synchronized. JustCode is an agile development add-in for Visual Studio , and that enhances. NET development productivity by providing blazing fast solution-wide, on-the-fly code analysis and error checking, smart code navigation and refactoring features.

Without having to deal with existing code and users. There is a very cool side-effect of this: the learning part.

Digging into Abstract Syntax Trees manipulations is super interesting. I implemented a couple of refactorings across these 2 months. I published the extension a few days ago on the Marketplace. But I am frustrated. To get an appropriate suggestion requires selecting exactly the code to refactor. I need to select the whole extracted statement first, which is slowing me down.

Talking about extraction, I often feel confused in front of all the suggested options. I know that there is a better way. I understand what it means, but it takes precious seconds to process.



0コメント

  • 1000 / 1000