The requested page is not available for the requested platform. You are viewing the content for Default platform.

Code Consolidation

  • 2 min to read

The Code Consolidation options page enables you to modify options for duplicate code consolidation.

opCodeConsolidation

The options page includes the following options:

  • Limit the number of introduced parameters in the consolidated declaration to

    Check this option to limit the number of parameters to introduce in the consolidated declaration.

    If the number of introduced parameters exceeds the specified value, CodeRush Classic shows that consolidation is not available for the current duplicate code cluster.

  • Limit the number of introduced type parameters in the consolidated declaration to

    Check this option to limit the number of type parameters to introduce in the consolidated declaration.

    If the number of introduced type parameters exceeds the specified value, CodeRush Classic shows that consolidation is not available for the current duplicate code cluster.

  • Move introduced type parameters into

    Specifies whether CodeRush Classic moves type parameters to a class declaration or to a method declaration.

  • When referenced members with the same signature can be consolidated into an ancestor class

    Specifies whether CodeRush Classic creates virtual or abstract members in the ancestor type, or passes the dependency members as parameters to the consolidated declaration, if referenced members with the same signature can be consolidated into an ancestor class.

  • When code differences promoted to parameters exist

    Specifies whether CodeRush Classic wraps member references into lambda expressions, or passes member references as parameters to the consolidated declaration, if there are code differences promoted to parameters.

Note

This product is designed for outdated versions of Visual Studio. Although Visual Studio 2015 is supported, consider using the CodeRush extension with Visual Studio 2015 or higher.