New Refactoring Video - Conditionals

New Refactor! Pro video is up, showing refactorings that work on conditional statements.

So far we've published four videos, demonstrating a total of 42 refactorings:

  • Conditionals
  • Expressions
  • Formatting and Structure
  • Loops and Blocks

    Refactorings, by category. are below:

    ASP.NET

    Add AssociatedControlID Attribute*

    Add RunAt Attribute*

    Add Validator*

    Convert Color to HEX

    Convert Color to Named Color

    Convert Color to RGB

    Convert to Pixels

    Convert to Points

    Convert to Skin

    Extract ContentPlaceHolder (and create master page)

    Extract ContentPlaceHolder

    Extract Script

    Extract Style (Class)

    Extract Style (id)

    Extract UserControl

    Make ID Unique

    Merge Styles

    Move Style Attributes to CSS

    Move Style Attributes to External CSS

    Move Style Attributes to Theme (use SkinID)

    Move Style Attributes to Theme

    Move to Code-behind

    Set CssClass*

    Split Style

    Surround with Update Panel*

    Toggle ViewState*

    Changing Signatures

    Add Parameter

    Create Overload

    Decompose Parameter

    Introduce Parameter Object

    Make Member Static

    Promote to Parameter

    Reorder Parameters

    Safe Rename

    Conditionals

    Case to Conditional

    Combine Conditionals

    Compress to Null Coalescing Operation

    Compress to Ternary Expression

    Conditional to Case

    Expand Null Coalescing Operation

    Expand Ternary Expression

    Flatten Conditional

    Initialize Conditionally

    Reverse Conditional

    Split Conditional

    Dead Code

    Remove Empty Handler

    Remove Parameter

    Remove Private Setter

    Remove Redundant Constructor

    Remove Redundant Delegate Creation

    Declaration and Initialization

    Convert to Initializer

    Decompose Initializer

    Move Declaration near Reference

    Move Initialization to Declaration

    Make Explicit

    Make Explicit (and Name Anonymous Type)

    Make Implicit

    Name Anonymous Type

    Split Initialization from Declaration

    Split Temporary Variable

    Expressions

    Convert to Is Nothing

    Inline Constant

    Introduce Constant

    Introduce Constant (local)

    Inline Recent Assignment

    Inline Result

    Inline Temp

    Introduce Local

    Introduce Local (replace all)

    Introduce Result Variable

    Replace with Constant

    Replace with Local

    Simplify Expression

    Formatting and Structure

    Break Apart Arguments

    Break Apart Parameters

    Create Multi-variable Declaration

    Line-up Arguments

    Line-up Parameters

    Split Multi-variable Declaration

    Interfaces

    Add to Interface*

    Extract Interface

    Lambda Expressions and Anonymous Methods

    Compress to Lambda Expression

    Expand Lambda Expression

    Inline Delegate

    Name Anonymous Method

    Loops and Blocks

    Add Block Delimiters

    Consolidate Using Statements

    Create With Statement

    For to ForEach

    ForEach to For

    Inline With Statement

    Introduce ForEach Action

    Introduce Using Statement

    Lock to Try/Finally

    Remove Block Delimiters

    Split With Statement

    Using to Try/Finally

    Macros

    Use Const

    Use typedef

    Moving/Extracting Methods

    Extract Function (outside of class)

    Extract Method

    Extract Property

    Move Method to Header

    Move Method to Source File

    Replace Temp with Query

    Properties and Fields

    Collapse Accessors

    Convert to Auto-implemented Property

    Convert to Auto-implemented Property (convert all)

    Create Backing Store

    Create Setter Method

    Encapsulate Field

    Encapsulate Field (read-only)

    Expand Accessors

    Introduce Setter Guard Clause*

    Method to Property

    Property to Method

    Remove Setter Guard Clause*

    Resource Files

    Extract String to Resource

    Extract to XAML Resource (replace all)

    Extract to XAML Resource

    Extract XML Literal to Resource

    Replace with XAML Resource

    Strings

    Inline Format Item

    Introduce Format Item

    Use IsNullOrEmpty

    Use String.Compare

    Use String.Format

    Use StringBuilder

    Types, Typecasting and Namespace References

    Boolean to Enum

    Convert to Built-in Type

    Convert to System Type

    Encapsulate Downcast

    Inline Alias

    Introduce Alias

    Introduce Alias (replace all)

    Move Type to File

    Move Type to Namespace

    Optimize Namespace References

    Remove Type Qualifier

    Remove Type Qualifier (replace all)

    Rename File to Match Type

    Rename Type to Match File

    Replace with Alias

    Renaming

    Rename

    Visibility

    Reduce Visibility

    Widen Scope

    Widen Scope (promote constant)

    Widen Scope (promote to field)

    XML, HTML, and XAML

    Add End Tag

    Change Tag*

    Remove Attribute*

    Remove End Tag

    Remove Tag*

    Reorder Attributes

    Surround with Tag*

     *Feature may change program behavior.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.