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

Remove duplicate project existence check

CheckContainsProject asserts the project exists, no need to duplicate
it.
上级 166190bc
......@@ -1217,12 +1217,7 @@ public SolutionState AddDocuments(ImmutableArray<DocumentInfo> documentInfos)
foreach (var documentInfosInProject in documentInfosByProjectId)
{
CheckContainsProject(documentInfosInProject.Key);
var oldProject = this.GetProjectState(documentInfosInProject.Key);
if (oldProject == null)
{
throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, documentInfosInProject.Key));
}
var oldProject = this.GetProjectState(documentInfosInProject.Key)!;
var newDocumentStatesForProjectBuilder = ArrayBuilder<T>.GetInstance();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册