-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Replace property with method #11549
Replace property with method #11549
Conversation
tagging @dotnet/roslyn-ide This is ready for review. Thanks! |
retest vsi please |
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsReplacePropertyWithMethods)] | ||
public async Task TestAutoProperty5() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expression bodied properties, and properties with different access levels for their get and set methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are tests for hte former. But i will add tests for the latter. thanks!
// the case for C# where we have mangled names for the backing field and need something | ||
// actually usable in code. | ||
var uniqueName = NameGenerator.GenerateUniqueName( | ||
property.Name.ToLowerInvariant(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't want to lowercase everything - just the first character?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Looks pretty good to me with fixes for the above comments. |
test vsi please |
retest windows_vsi_p1_open_prtest please |
retest windows_vsi_p2_open_prtest please |
This PR adds a new refactoring where you can take an property and convert it to Get/Set methods.