-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Update 'use auto property' to respect user options around this.
for property access.
#79405
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
Update 'use auto property' to respect user options around this.
for property access.
#79405
Conversation
@@ -142,8 +142,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename | |||
' marshaled back. | |||
|
|||
Return Renamer.RenameSymbolAsync( | |||
solution, symbol, renameTo, renameOptions, | |||
nonConflictSymbolKeys:=Nothing, CancellationToken.None).GetAwaiter().GetResult() | |||
solution, symbol, renameTo, renameOptions, CancellationToken.None).GetAwaiter().GetResult() |
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.
As part of this, use-auto-prop is no longer going through the 'rename' codepaths itself. That is because the space of what is needs to rename is so narrow that there isn't much benefit here, and because we used to have to hack up the rename engine itself to support the somewhat strange scenario that Use-Auto-Prop is following. Specifically, 'use auto prop' renames a field (with name 'f') to match the name of a property 'P'. This is, definitionally, a conflict. So we hacked up the rename engine to let the caller tell it to ignore that.
We no longer need this capability, so all that threading through of these values is gone.
CancellationToken cancellationToken) | ||
{ | ||
var solutionEditor = new SolutionEditor(solution); | ||
|
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.
use-auto-prop now owns its rewriting strategy. so it can tweak it as appropriate. In this case, this all revolves around if it will have or not have this.
when updating a simple name F
to P
.
5a5cbf9
to
f75dade
Compare
/azp run roslyn-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
No description provided.