-
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
Do not offer 'convert' namespace when the ns has sibling types #74216
Conversation
{ | ||
} | ||
"; | ||
var code = """ |
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.
just converting to raw srtings.
@@ -61,6 +62,9 @@ public Test() | |||
/// <inheritdoc cref="SharedVerifierState.Options"/> | |||
internal OptionsCollection Options => _sharedState.Options; | |||
|
|||
[StringSyntax("C#-Test")] public new string TestCode { set => base.TestCode = value; } | |||
[StringSyntax("C#-Test")] public new string FixedCode { set => base.FixedCode = value; } |
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.
allows syntax highlighting of test code.
@@ -244,6 +244,7 @@ | |||
<Compile Include="$(MSBuildThisFileDirectory)EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs" /> | |||
<Compile Include="$(MSBuildThisFileDirectory)EmbeddedLanguages\Common\EmbeddedSyntaxTree.cs" /> | |||
<Compile Include="$(MSBuildThisFileDirectory)EmbeddedLanguages\Common\EmbeddedSyntaxTrivia.cs" /> | |||
<Compile Include="$(MSBuildThisFileDirectory)EmbeddedLanguages\PredefinedEmbeddedLanguageClassifierNames.cs" /> |
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.
moved to shared file so we can reference the "CSharpTest" constant in the test files.
internal class ConvertNamespaceCodeRefactoringProvider : SyntaxEditorBasedCodeRefactoringProvider | ||
[method: ImportingConstructor] | ||
[method: SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")] | ||
internal class ConvertNamespaceCodeRefactoringProvider() : SyntaxEditorBasedCodeRefactoringProvider |
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.
nit: seal?
Fixes #74214