Move C#-specific shared code style options to CSharpCodeStyleOptions#39251
Move C#-specific shared code style options to CSharpCodeStyleOptions#39251JoeRobich merged 6 commits intodotnet:masterfrom castholm:move-code-style-options
Conversation
| End Property | ||
|
|
||
|
|
||
| Public Property Style_PreferThrowExpression As String |
There was a problem hiding this comment.
I'm not sure what the consequences of removing these properties are. Are they okay to remove or should they be left but marked as obsolete?
There was a problem hiding this comment.
Good question. @jasonmalinowski what's the story with these automation objects. If we remove them, that may break things right? like with settins sync?
There was a problem hiding this comment.
What these are used for is importing/exporting from .vssettings files (amongst a few other obscure things.) It doesn't impact setting sync, but removing it would mean a .vssettings file with this contained will not apply the user's setting correctly. I don't know if it'll visibly say that it can't apply or whether it'll just do it silently and leave the user confused.
I also don't know how many people actually use .vssettings files...
There was a problem hiding this comment.
We do still read and write these in the C# AutomationObject where they apply though.
...enerateConstructorFromMembers/CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs
Show resolved
Hide resolved
...enerateConstructorFromMembers/CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
src/Features/CSharp/Portable/UseDeconstruction/CSharpUseDeconstructionDiagnosticAnalyzer.cs
Show resolved
Hide resolved
...erateConstructorFromMembers/AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs
Outdated
Show resolved
Hide resolved
...teConstructorFromMembers/VisualBasicGenerateConstructorFromMembersCodeRefactoringProvider.vb
Show resolved
Hide resolved
JoeRobich
left a comment
There was a problem hiding this comment.
Changes look good to me. Thanks!
Fixes #30042.
Most changes are fairly straightfoward, but one significant change is
GenerateConstructorFromMembersCodeRefactoringProviderbeing made abstract and split into language-specific implementations.To get around the issues of certain shared features depending on the now inaccessible PreferThrowExpression option, I added abstract methods for retrieving the value of the option that are overridden by the language-specific implementations. I'm not sure if it's the best way of handling it, but it minimizes the impact of the option being moved and was the solution I felt the most comfortable going with.