Skip to content

Rewrites for same class token #186

@builder-main

Description

@builder-main

This is the usecase I'd like to make workable. I open this as a reference and will try to make a PR sooner or later.

public class MyClass{

     private void MyMethod(){
       var myOtherInstanceOfMyClass = RetrieveOtherInstance<MyClass>();
       myOtherInstanceOfMyClass.MyOtherMethod();

       myOtherInstanceOfMyClass = RetrieveOtherInstance(typeof(MyClass));
       myOtherInstanceOfMyClass.MyOtherMethod();

      MyClass myOtherAgain= new MyClass();
      myOtherAgain.MyOtherMethod();
    }
    
     private void MyOtherMethod(){};

}

It seems doable as we simply need to rewrite <MyClass> and Typeof(myclass) and class naming, which is not rewritten when in the same class as of now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestuser-code-rewriteRelates to code rewrite that tool performs on user code to make it compilable / redirect-ready

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions