提交 e355099c 编写于 作者: C Cyrus Najmabadi

PR feedback.

上级 414753cb
......@@ -282,9 +282,13 @@ private static string GetTitle(Scope scope)
var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
// We should only ever get a default array (meaning, update the root), or a
// non-empty array. We should never be asked to update exactly '0' nodes.
Debug.Assert(!documentToUpdate.NodesToUpdate.IsEmpty);
// If we were given specific nodes to update, only update those. Otherwise
// updated everything from the root down.
var nodesToUpdate = documentToUpdate.NodesToUpdate.IsDefaultOrEmpty
var nodesToUpdate = documentToUpdate.NodesToUpdate.IsDefault
? ImmutableArray.Create(syntaxRoot)
: documentToUpdate.NodesToUpdate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册