In this post we will see Refactoring techniques using Telerik JustCode. Telerik Just Code helps to perform following refactor operation.
You can perform many refactoring using Teleirk Just Code. Few of the refactoring can be performed are as below,
- Convert Abstract class to Interface
- Convert Interface to Abstract class
- Convert Anonymous method to Lambda
- Convert Anonymous method to Named Method
- Convert Class selector to ID selector in CSS
- Convert ID selector to Class selector in CSS
- Convert Constructor to Factory method
- Convert Extension method to Static method
- Convert Method to Property
- Convert Lambda to Named Method
- Convert Lambda to Anonymous method and many more
Let us see few of the refactoring; we can perform using Telerik JustCode
Convert Abstract class to Interface
Let us s you have abstract class as below,
This class can be refactored to interface using Telerik Just Code.
- Select class and press Alt+Insert
- Choose R option
- From R option choose convert to Interface
After converting resultant interface would be as below,
Convert Anonymous method to Lambda Expression
I have created a delegate as below,
And using delegate with anonymous function as below,
Above anonymous function can be converted to Lambda Expression as below,
- Select anonymous function and press Alt+Insert
- Choose R option
- From R option choose convert to Interface
Resultant lambda expression would be as below,
Convert Anonymous method to Named Method
If you want to convert above anonymous method to named method, you can very much do that as below,
- Select anonymous function and press Alt+Insert
- Choose R option
- From R option choose To Named Method
Resultant named method would be as below,
Convert Constructor to Factor Method
I have a class with constructor as below,
If you want to convert constructor to factory method, you can do that as below,
- Select constructor and press Alt+Insert
- Choose R option
- From R option choose Convert Constructor to Factor method
Resultant factor method would be as below,
In similar way you can perform other refactoring operations using Telerik Just Code. I hope this post is useful. Thanks for reading
Follow @debug_mode