JustCode

The Extract Class From Parameters, once invoked on a class parameter with empty selection, all parameters will be extracted to newly created class members and replaced with a single parameter of the new class type.

Note

Language Support

Supported: C#, VB.NET

Not relevant: JavaScript, ASP.NET, XAML, HTML

To extract class from all parameters

  1. Place the cursor inside the parameters of a method invocation.

  2. Press Alt+Insert. From the pop-up menu select Extract Class From Parameters.

    Extract Class From Parameters
  3. Telerik JustCode will create a class which will wrap all the parameters and keep the logic of the code.

  4. The result is:

    Extract Class From Parameters Result

To extract class from selected parameters

  1. Select with the caret the parameters you would like to wrap in a class.

  2. Press Alt+Insert. From the pop-up menu select Extract Class From Parameters.

    Extract Class From Parameters Selection
  3. JustCode will create a class which will wrap the selected parameters and keep the logic of the code.

  4. The result is:

    Extract Class From Parameters Selection Result

See Also