提交 c6a7a728 编写于 作者: J Jason Malinowski

Add additional waits for for the Workspace when async things happen

上级 6c4173ff
......@@ -102,13 +102,21 @@ public void OpenFileWithDesigner(ProjectUtils.Project project, string fileName)
=> _inProc.OpenFileWithDesigner(project.Name, fileName);
public void OpenFile(ProjectUtils.Project project, string fileName)
=> _inProc.OpenFile(project.Name, fileName);
{
// Wireup to open files can happen asynchronously in the case we're being notified of changes on background threads.
_inProc.OpenFile(project.Name, fileName);
_instance.Workspace.WaitForAsyncOperations(FeatureAttribute.Workspace);
}
public void UpdateFile(string projectName, string fileName, string contents, bool open = false)
=> _inProc.UpdateFile(projectName, fileName, contents, open);
public void RenameFile(ProjectUtils.Project project, string oldFileName, string newFileName)
=> _inProc.RenameFile(project.Name, oldFileName, newFileName);
{
// Wireup to open files can happen asynchronously in the case we're being notified of changes on background threads.
_inProc.RenameFile(project.Name, oldFileName, newFileName);
_instance.Workspace.WaitForAsyncOperations(FeatureAttribute.Workspace);
}
public void CloseFile(ProjectUtils.Project project, string fileName, bool saveFile)
=> _inProc.CloseFile(project.Name, fileName, saveFile);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册