Is there a way to Extract Method to New Class in R#?
I am currently looking at this code where
I can use a Strategy design-pattern and I would really like to extract the 50 or so methods each to a different class
(perhaps named similar to the method name). Is there functionality to do this in R#?
Something like this:
---------------------------
Public Class A
Public Sub Test() ...
Public Sub Test2() ...
Public Sub Test3() ...
End Class
TO (in different files of course):
---------------------------------------------
Public Class Test()
Public Sub Process() ...
End Class
Public Class Test2()
Public Sub Process() ...
End Class
Public Class Test3()
Public Sub Process() ...
End Class
Please sign in to leave a comment.
Hello Denis,
At the moment there's no such refactoring in ReSharper which would do this
in a single step. There's a similar request in our tracker: http://youtrack.jetbrains.net/issue/RSRP-159792,
however it seems that you'd like to have something like 'Promote method to
a class' refactoring or a 'Use Strategy pattern' refactoring which is different
from Extract method to new class.
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
+1 vote from me
Created task:
http://youtrack.jetbrains.net/issue/RSRP-270325 (if R# team decides to do it)