History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-53062
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Serge Baltic
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

Refac::CS::MoveStaticMember: Should Support Moving a Generic Method into a Generic Class, and Vice Versa

Created: 19 Nov 07 00:50   Updated: 07 Feb 08 21:16
Component/s: Refactorings - Move Static Members
Fix Version/s: Mirabilie Futurum
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
A scenario that is common enough: moving ClassA.Method<T>() to become ClassB<T>.Method() and vice versa.

Would be nice to update the call sites by moving the type parameters spec between method/class, to avoid breaking the code.



 All   Comments   Work Log   Change History      Sort Order:
Sergey Shkredov - 07 Feb 08 21:16
Presented case is not common enoght to be included in move refactoring.
Heavy UI is required to map source method's parameters to the target class parameters.

For now usages can easily be updated by inlining of following method:

Method<T>(T t)
{
   ClassB<T>.Method(t);
}

Code of method have to be moved manually or inlined in the target class:

Method(T t)
{
   ClassA.Method<T>(t); <- inline here
}