dotnet/roslyn

Enhance "Move Type To {FileName}.cs" Refactoring to be Generic-Aware

Offen

#57.843 geöffnet am 18.11.2021

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (4.257 Forks)batch import
Area-IDEConcept-Continuous ImprovementDeveloper Communityhelp wanted

Repository-Metriken

Stars
 (20.414 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

This issue has been moved from a ticket on Developer Community.


Let's say I have the following code:

public class C<T1>{ }
public class C<T1,T2>{ }
public class C<T1,T2,T3>{ }
public class C<T1,T2,T3,T4>{ }
public class C<T1,T2,T3,T4,T5>{ }

Today, regardless of which class I select, I get the same refactoring: Move type to C.cs

And if I use it, I have unpredictable results based on the order I run it in. For example, regardless of which class I move first, it will be moved to C.cs, the second one will be C1.cs, etc

Instead, it would be really nice if the filename was Generic-aware and suggested the following: Move type to C`1.cs Move type to C`2.cs Move type to C`3.cs Move type to C`4.cs Move type to C`5.cs


Original Comments

Feedback Bot on 11/3/2021, 11:58 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Contributor Guide