Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opposite of Use Inferred Member Name (IDE0037) #39789

Open
vsfeedback opened this issue Nov 12, 2019 · 1 comment
Open

Opposite of Use Inferred Member Name (IDE0037) #39789

vsfeedback opened this issue Nov 12, 2019 · 1 comment
Labels
Area-IDE Concept-Continuous Improvement Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Nov 12, 2019

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


Add the opposite to Use Inferred Member Name. VS allows to simplify the expression and suggests to use the inferred member name. I would like to be able to transform code to unsimplify it

x.Select(o => new {
o.A,
o.B,
});

becomes

x.Select(o => new {
A = o.A,
B = o.B,
});

This is useful for readability and if you want to create a new type


Original Comments

Visual Studio Feedback System on 10/28/2019, 01:28 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

@sharwell sharwell added the Developer Community The issue was originally reported on https://developercommunity.visualstudio.com label Nov 21, 2019
@sharwell
Copy link
Member

We have existing refactorings for 'Use tuple element name' and 'Add argument name'. It would be a natural extension of these features to have a refactoring to explicitly specify the name of an anonymous type member.

@sharwell sharwell added Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings labels Nov 27, 2019
@sharwell sharwell added this to InQueue in Small Fixes via automation Nov 27, 2019
@jinujoseph jinujoseph added this to the Backlog milestone Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement Developer Community The issue was originally reported on https://developercommunity.visualstudio.com help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
Small Fixes
  
InQueue
Development

No branches or pull requests

4 participants