diff --git a/src/EditorFeatures/VisualBasicTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.vb b/src/EditorFeatures/VisualBasicTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.vb index ec7cf07d099622f38eabe8c8ad767b6fbf6c7099..99f038694b26fafd6dfb5d948cc17409d881aed6 100644 --- a/src/EditorFeatures/VisualBasicTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.vb +++ b/src/EditorFeatures/VisualBasicTest/ConvertToInterpolatedString/ConvertConcatenationToInterpolatedStringTests.vb @@ -584,8 +584,8 @@ Public Class C Const World As String = ""World"" Console.WriteLine($""{Hello} {World}"") End Sub -End Class") -) +End Class +") End Function End Class End Namespace diff --git a/src/Features/CSharp/Portable/ConvertToInterpolatedString/CSharpConvertConcatenationToInterpolatedStringRefactoringProvider.cs b/src/Features/CSharp/Portable/ConvertToInterpolatedString/CSharpConvertConcatenationToInterpolatedStringRefactoringProvider.cs index bbe2aa6638dbf2a7cc9f5e776dcb69110175b728..eade3b5e40e8e06810b9290a559bedb949a40672 100644 --- a/src/Features/CSharp/Portable/ConvertToInterpolatedString/CSharpConvertConcatenationToInterpolatedStringRefactoringProvider.cs +++ b/src/Features/CSharp/Portable/ConvertToInterpolatedString/CSharpConvertConcatenationToInterpolatedStringRefactoringProvider.cs @@ -34,10 +34,5 @@ protected override string GetTextWithoutQuotes(string text, bool isVerbatim, boo => isVerbatim ? text.Substring("@'".Length, text.Length - "@''".Length) : text.Substring("'".Length, text.Length - "''".Length); - - protected override bool IsConstMemberDeclaration(SyntaxNode node, ISyntaxFactsService syntaxFacts) - { - return syntaxFacts.GetModifiers(node).Any(SyntaxKind.ConstKeyword); - } } } diff --git a/src/Features/Core/Portable/ConvertToInterpolatedString/AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs b/src/Features/Core/Portable/ConvertToInterpolatedString/AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs index 267b1644664eeda5d95b1c599db1363397ab34cc..e6b5e2b6432d3340031f4e8a8a0beaffadc441f5 100644 --- a/src/Features/Core/Portable/ConvertToInterpolatedString/AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs +++ b/src/Features/Core/Portable/ConvertToInterpolatedString/AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs @@ -23,8 +23,6 @@ namespace Microsoft.CodeAnalysis.ConvertToInterpolatedString internal abstract class AbstractConvertConcatenationToInterpolatedStringRefactoringProvider : CodeRefactoringProvider where TExpressionSyntax : SyntaxNode { - protected abstract bool IsConstMemberDeclaration(SyntaxNode node, ISyntaxFactsService syntaxFacts); - public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context) { var (document, textSpan, cancellationToken) = context; diff --git a/src/Features/VisualBasic/Portable/ConvertToInterpolatedString/VisualBasicConvertConcatenationToInterpolatedStringRefactoringProvider.vb b/src/Features/VisualBasic/Portable/ConvertToInterpolatedString/VisualBasicConvertConcatenationToInterpolatedStringRefactoringProvider.vb index c96589a8f78f1335868480abe577a70fdd164c74..09da84d964824b5daa5270e740855240d80b9afe 100644 --- a/src/Features/VisualBasic/Portable/ConvertToInterpolatedString/VisualBasicConvertConcatenationToInterpolatedStringRefactoringProvider.vb +++ b/src/Features/VisualBasic/Portable/ConvertToInterpolatedString/VisualBasicConvertConcatenationToInterpolatedStringRefactoringProvider.vb @@ -30,9 +30,5 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ConvertToInterpolatedString Return text.Substring("'".Length, text.Length - "''".Length) End If End Function - - Protected Overrides Function IsConstMemberDeclaration(node As SyntaxNode, syntaxFacts As ISyntaxFactsService) As Boolean - Return syntaxFacts.GetModifiers(node).Contains(Function(s) s.IsKind(SyntaxKind.ConstKeyword)) - End Function End Class End Namespace