I am trying to use NRefactory for my refactorings, I have an old style code written in non OOP style
the thing I need to do is for each class T move static methods accepting T as first parameter type into a new class ExtensionsForT and change references to it look like X.method1(t)=>t.method1()
//------------------original-------------------------------------------
class BigClass{
//method is referenced here
public BigClass(){
Reader r=new Reader();
//...
Next(r);
}
//method to refactor
public static bool Next( Reader r){
//...
}
}
//-------------------- want to achieve this-------------------------
class BigClass{
//method is referenced here
public BigClass(){
Reader r=new Reader();
//...
r.Next();
}
}
public class ReaderExtensions{
//method to refactor
public static bool Next(this Reader r){
//...
}
}