提交 8ec4efd6 编写于 作者: J Julia Feng

update format

上级 c3dba4ef
...@@ -584,8 +584,8 @@ Public Class C ...@@ -584,8 +584,8 @@ Public Class C
Const World As String = ""World"" Const World As String = ""World""
Console.WriteLine($""{Hello} {World}"") Console.WriteLine($""{Hello} {World}"")
End Sub End Sub
End Class") End Class
) ")
End Function End Function
End Class End Class
End Namespace End Namespace
...@@ -34,10 +34,5 @@ protected override string GetTextWithoutQuotes(string text, bool isVerbatim, boo ...@@ -34,10 +34,5 @@ protected override string GetTextWithoutQuotes(string text, bool isVerbatim, boo
=> isVerbatim => isVerbatim
? text.Substring("@'".Length, text.Length - "@''".Length) ? text.Substring("@'".Length, text.Length - "@''".Length)
: 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);
}
} }
} }
...@@ -23,8 +23,6 @@ namespace Microsoft.CodeAnalysis.ConvertToInterpolatedString ...@@ -23,8 +23,6 @@ namespace Microsoft.CodeAnalysis.ConvertToInterpolatedString
internal abstract class AbstractConvertConcatenationToInterpolatedStringRefactoringProvider<TExpressionSyntax> : CodeRefactoringProvider internal abstract class AbstractConvertConcatenationToInterpolatedStringRefactoringProvider<TExpressionSyntax> : CodeRefactoringProvider
where TExpressionSyntax : SyntaxNode where TExpressionSyntax : SyntaxNode
{ {
protected abstract bool IsConstMemberDeclaration(SyntaxNode node, ISyntaxFactsService syntaxFacts);
public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context) public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context)
{ {
var (document, textSpan, cancellationToken) = context; var (document, textSpan, cancellationToken) = context;
......
...@@ -30,9 +30,5 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ConvertToInterpolatedString ...@@ -30,9 +30,5 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ConvertToInterpolatedString
Return text.Substring("'".Length, text.Length - "''".Length) Return text.Substring("'".Length, text.Length - "''".Length)
End If End If
End Function 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 Class
End Namespace End Namespace
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册