dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.01k stars 4.03k forks source link

Refactoring to reorder tuple elements #52892

Open jnm2 opened 3 years ago

jnm2 commented 3 years ago

The scope of the change should be the same as the scope that a tuple element rename would have, whenever that is decided: https://github.com/dotnet/roslyn/issues/14115

Example

I have this code, with three callers. I decided it's confusing on the call side to have the URLs last, so I want to move each string Url tuple elements to be the first element. It would be nice to be able to invoke a refactoring for each of the two moves which would fix up the callers and also the tuple usages within this method:

public static void WriteLinkPanel(
    Action<string> writeLine,
    (string Display, string Url) fileLink,
    string webAccessUrl = null,
    (string Display, string Url, string AssemblyName)? projectLink = null)
JoeRobich commented 3 years ago

Proposal from design meeting: