提交 2662be33 编写于 作者: A Andrew Hall (METAL)

Update to formatter changes

上级 bd72b5cf
......@@ -355,13 +355,11 @@ private async Task<Solution> GetFormattedSolutionAsync(Solution unformattedSolut
foreach (var documentId in documentIds)
{
var document = formattedSolution.GetDocument(documentId);
var formattedRoot = await Formatter.FormatAsync(
await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false),
var formattedDocument = await Formatter.FormatAsync(
document,
Formatter.Annotation,
document.Project.Solution.Workspace,
cancellationToken: cancellationToken).ConfigureAwait(false);
var formattedDocument = document.WithSyntaxRoot(formattedRoot);
var simplifiedDocument = await Simplifier.ReduceAsync(
formattedDocument,
Simplifier.Annotation,
......
......@@ -107,12 +107,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ExtractInterface
SyntaxFactory.TypeArgumentList(SyntaxFactory.SeparatedList(extractedInterfaceSymbol.TypeParameters.Select(Function(p) SyntaxFactory.ParseTypeName(p.Name))))),
SyntaxFactory.ParseTypeName(extractedInterfaceSymbol.Name))
Dim formattedStatementSyntax = Await Formatter.FormatAsync(
implementedInterfaceStatementSyntax, unformattedSolution.Workspace,
cancellationToken:=cancellationToken).ConfigureAwait(False)
Dim implementedInterfaceStatement = formattedStatementSyntax.ToFullString()
For Each member In includedMembers
Dim annotation = symbolToDeclarationAnnotationMap(member)
......@@ -139,7 +133,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.ExtractInterface
Continue For
End If
Dim qualifiedName As QualifiedNameSyntax = SyntaxFactory.QualifiedName(SyntaxFactory.ParseName(implementedInterfaceStatement), SyntaxFactory.IdentifierName(member.Name))
Dim qualifiedName As QualifiedNameSyntax = SyntaxFactory.QualifiedName(implementedInterfaceStatementSyntax.GetRightmostName(), SyntaxFactory.IdentifierName(member.Name))
Dim method = TryCast(token.Parent, MethodStatementSyntax)
If method IsNot Nothing Then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册