提交 9e1fe144 编写于 作者: C Cyrus Najmabadi

make codepaths more async.

上级 41185705
......@@ -85,7 +85,7 @@ public static async Task<Document> FormatAsync(Document document, OptionSet opti
}
var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
return document.WithSyntaxRoot(Format(root, document.Project.Solution.Workspace, options, cancellationToken));
return document.WithSyntaxRoot(await FormatAsync(root, document.Project.Solution.Workspace, options, cancellationToken).ConfigureAwait(false));
}
/// <summary>
......
......@@ -1194,7 +1194,7 @@ private ProjectInfo CreateProjectInfo(Project project)
private SourceText GetTextForced(TextDocument doc)
{
return doc.GetTextAsync(CancellationToken.None).WaitAndGetResult(CancellationToken.None); // needs wait (called during TryApplyChanges)
return doc.GetTextAsync(CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None); // needs wait (called during TryApplyChanges)
}
private DocumentInfo CreateDocumentInfoWithText(TextDocument doc)
......
......@@ -2956,4 +2956,4 @@ public Assembly LoadFromPath(string fullPath)
}
}
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册