提交 bea6d3af 编写于 作者: C CyrusNajmabadi

Add comment.

上级 a046f9d8
......@@ -29,8 +29,14 @@ private static void FreeSymbolMap(MultiDictionary<string, ISymbol> symbolMap)
Project project, CancellationToken cancellationToken)
{
var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
var stateChecksums = await project.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
// The SymbolTree for source is built from the source-symbols from the project's compilation's
// assembly. Specifically, we only get the name, kind and parent/child relationship of all the
// child symbols. So we want to be able to reuse the index as long as none of these have
// changed. The only thing that can make those source-symbols change in that manner are if
// the text of any document changes, or if options for the project change. So we build our
// checksum out of that data.
var stateChecksums = await project.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
var checksum = Checksum.Create(nameof(SymbolTreeInfo),
new Checksum[] { stateChecksums.Documents.Checksum, stateChecksums.CompilationOptions, stateChecksums.ParseOptions });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册