Visual Studio代码重构插件Refactor! Pro

今天升级到VS 2008,在写代码时想做一些重构(refactor)的操作,却发现VS的重构没有提供提取常量(extract constant)的功能。查找了一下,找到了这个著名的第三方重构插件:Refactor!™ Pro

image

 

支持的重构

Add AssociatedControlID Attribute Add Block Delimiters Add End Tag
Add Parameter Add RunAt Attribute Add to Interface
Add Validator Boolean to Enum Break Apart Arguments
Break Apart Parameters Case to Conditional Change Tag
Collapse Accessors Combine Conditionals Compress to Lambda Expression
Compress to Null Coalescing Operation Compress to Ternary Expression Conditional to Case
Consolidate Using Statements Convert to Auto-implemented Property Convert to Auto-implemented Property (convert all)
Convert to Built-in Type Convert to Create & Set Convert to HEX
Convert to Initializer Convert to IsNothing Convert to Named Color
Convert to Pixels Convert to Points Convert to RGB
Convert to Skin Convert to System Type Create Backing Store
Create Method Contract Create Method Stub Create Multi-variable Declaration
Create Overload Create Setter Method Create With Statement
Decompose Parameter Encapsulate Downcast Encapsulate Field
Expand Accessors Expand Lambda Expression Expand Null Coalescing Operation
Expand Ternary Expression Extract ContentPlaceHolder Extract ContentPlaceHolder (Create Master)
Extract Function (outside of class) Extract Interface Extract Method
Extract Property Extract Script Extract String to Resource
Extract Style (Class) Extract Style (id) Extract to User Control
Extract to XAML Resource Extract to XAML Resource (replace all) Extract XML Literal to Resource
Flatten Conditional For to ForEach ForEach to For
Inline Alias Inline Constant Inline Delegate
Inline Format Item Inline Macro Inline Recent Assignment
Inline Result Inline Temp Inline With Statement
Introduce Alias Introduce Alias (replace all) Introduce Constant
Introduce ForEach Action Introduce Format Item Introduce Local
Introduce Local (replace all) Introduce Parameter Object Introduce Result Variable
Introduce Setter Guard Clause Introduce Using Statement Line-up Arguments
Line-up Parameters Lock to Try/Finally Make Explicit
Make Explicit (and Name Anonymous Type) Make Id Unique Make Implicit
Make Method Static Merge Styles Method to Property
Move Declaration Near Reference Move Initialization to Declaration Move Method to Header
Move Method to Source File Move Style Attributes to CSS Move Style Attributes to External CSS
Move Style Attributes to Theme Move Style Attributes to Theme (use SkinId) Move to Code-behind
Move Type to File Move Type to Namespace Name Anonymous Method
Name Anonymous Type Optimize Namespace References Promote to Parameter
Property to Method Reduce Visibility Remove Assignments to Parameters
Remove Attribute Remove Block Delimiters Remove Empty Handler
Remove End Tag Remove Parameter Remove Private Setter
Remove Redundant Assignment Remove Redundant Conditional Remove Setter Guard Clause
Remove Tag Remove Type Qualifier Remove Type Qualifier (replace all)
Rename Rename File to Match Type Rename Type to Match File
Reorder Attributes Reorder Parameters Replace Temp with Query
Replace with Alias Replace with Constant Replace with Local
Replace with XAML Resource Reverse Conditional Safe Rename
Set CssClass Simplify Expression Split Conditional
Split Initialization from Declaration Split Multi-variable Declaration Split Style
Split Temporary Variable Split With Statement Surround with Tag
Surround with Update Panel Toggle ViewState Use Const (C++ only)
Use IsNullOrEmpty Use String.Compare Use String.Format
Use StringBuilder Use typedef (C++ only) Using to Try/Finally
Widen Scope (promote constant) Widen Scope (promote to field)

博客园老李早有介绍:http://www.cnblogs.com/Terrylee/archive/2007/02/07/free_refactoring_tools_for_aspnet.html

其它参考文档:Free refactoring tools for ASP.NET code in Visual Studio 2005

 

试用版下载:

http://www.devexpress.com/Downloads/Visual_Studio_Add-in/Refactoring/

posted on   m2land  阅读(3069)  评论(4编辑  收藏  举报

编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述
历史上的今天:
2007-09-29 空DIV在IE中的高度问题
2007-09-29 DotNetNuke04.3.7 升级到 4.6.0 时报错

导航

统计

点击右上角即可分享
微信分享提示