RefactorAsp 的使用说明

RefactorAsp是一款强大的ASP.NET重构工具,提供多种功能帮助开发者提高代码质量。包括但不限于将选择的验证器添加到活动输入控件、将内容从母版页提取到新的.aspx文件、将内联样式转换为命名类样式等。此外,还支持C#或Visual Basic代码文件的重构操作,如创建重载方法、封装字段为属性、提取方法、简化表达式等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

RefactorAsp 的下载地址:http://www.devexpress.com/Products/NET/IDETools/RefactorASP/

Add Validator
Adds one or more selected Validators to the active input control.

Extract ContentPlaceHolder
Moves the selected content from a .master page to a new .aspx file, placing it inside <asp:content> tags, and inserts a new <asp:contentplaceholder> tag at the extraction point inside the master page.

Extract ContentPlaceHolder (and create master page)
Moves the content that is *outside* of the selection (in the active .aspx page) to a new master page, inserting a <asp:contentplaceholder> tag to reference the extracted content, and then wraps the selection in the aspx page with <asp:content> tags and adds a MasterPageFile attribute to link to the new master page.

Extract Style (Class)
Converts an inline style to a named class style.

Extract Style (id)
Converts an inline style to a named id style.

Extract to UserControl
Creates a UserControl for the selected block including content and dependent code.

Move Style Attributes to CSS
Moves styling attributes from the active control to a new CSS class and applies the class to the control.

Move to Code-behind
Moves code located in <script> tags to the code-behind file.

Rename Style
Renames the active CSS style and updates all references to that style.

Surround with Update Panel
Surrounds a contiguous block of text in the source view with <asp:UpdatePanel …> and <ContentTemplate> tags.


 

This release also includes nineteen refactorings that work your C# or Visual Basic code-behind files:

Create Overload
Creates an overloaded method similar to the one at the caret, with fewer parameters.

Encapsulate Field
Encapsulates a field into a read-write property and replaces all occurrences of this field throughout the class with the newly declared property.

Extract Method
Creates a new method from the selected code block. The selection is replaced with appropriate calling code to invoke the newly-declared method.

Extract Property
Creates a new property from the selected code block. The selection is replaced with appropriate code to reference the newly-declared property.

Flatten Conditional
Unindents the If or Else statement for this conditional. This will apply one of the following refactorings: Replace Nested Conditional with Guard Clause, Remove Redundant Else, or Reverse Conditional followed by Remove Redundant Else.

Inline Temp
Replaces all references to a local variable with its initial value.

Introduce Constant
Declares a new constant, initialized to the value of the string or number at the caret.

Introduce Local
Creates a new local variable initialized to the selected expression. Replaces the selection with the new variable.

Introduce Local (replace all)
Creates a new local variable initialized with the selected expression. Replaces the expression everywhere it appears inside the code block with the new variable.

Move Declaration Near Reference
Moves the declaration statement for this local variable near its first reference.

Move Initialization to Declaration
Combines a local variable's declaration with its first initialization.

Rename
Renames the active local variable, function, method, field, property, parameter, type, or namespace and updates all references to the modified element.

Reorder Parameters
Reorders parameters in the current method, and then updates calling code to reflect the new order.

Replace Temp with Query
Replaces each reference to the active local variable with a call to an extracted method, which returns the initial value assigned to the local.

Reverse Conditional
Inverts the logic in this conditional statement and swaps the If and Else blocks.

Safe Rename
Safely renames non-private methods and properties by creating a duplicate member to preserve the old signature, calling the renamed member from the old member. The old member is hidden from Intellisense and marked "Obsolete". References to the old member will generate compiler warnings directing developers to the new renamed member.

Simplify Expression
Resolves an expression to its simplest form.

Split Initialization from Declaration
Breaks an initialized declaration for a local variable into a declaration and a separate initialization statement.

Split Temporary Variable
Splits a local variable which has too many assignments, declaring a new local at the first new assignment following the first reference. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值