RefactorAsp 的使用說明

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. 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章