Missing ReSharper Feature - Refactor to Design Pattern
by David Hayden ( Microsoft MVP C# )
Last night I needed to refactor some conditional logic to a particular strategy. Already having gone through roughly the same set of refactoring steps to do this in another section of the application, I thought to myself - “Why doesn't ReSharper have an option to refactor code to a particular design pattern?”
In particular, I think refactoring to the strategy pattern is a fairly easy refactoring that could be done by ReSharper. One of my favorite books, Refactoring to Patterns by Joshua Kerievsky, is a really nice catalog of refactorings explaining step-by-step how you could achieve various refactorings to patterns.
Obviously it is important to understand the refactoring steps without a tool. You don't want to get yourself into tool dependency. But, certainly the option of having ReSharper apply several refactorings for you to a particular design pattern is a very productive thing. You always have the option of applying the steps yourself in case you feel yourself getting a little rusty :)