提交 18de8391 编写于 作者: Y Youssef Victor

Improve code

上级 90d4d714
......@@ -41,9 +41,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.RemoveUnnecessaryByVal
Protected Overrides Async Function FixAllAsync(document As Document, diagnostics As ImmutableArray(Of Diagnostic), editor As SyntaxEditor, cancellationToken As CancellationToken) As Task
Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Dim node = DirectCast(root.FindNode(diagnostics.First().Location.SourceSpan), ParameterSyntax)
Dim withoutByVal = node.Modifiers.Where(Function(m) Not m.IsKind(SyntaxKind.ByValKeyword))
Dim tokenList = SyntaxTokenList.Create(New SyntaxToken())
tokenList.AddRange(withoutByVal)
Dim tokenList = SyntaxFactory.TokenList(node.Modifiers.Where(Function(m) Not m.IsKind(SyntaxKind.ByValKeyword)))
editor.ReplaceNode(node, node.WithModifiers(tokenList))
End Function
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册