From 77a26f0e9b86f995bcc9e3bcfa9bdc4cd4b06f45 Mon Sep 17 00:00:00 2001 From: Jason Malinowski Date: Fri, 23 Sep 2022 15:54:17 -0700 Subject: [PATCH] Add comments to IResultSetTracker --- .../ResultSetTracking/IResultSetTracker.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Features/Lsif/Generator/ResultSetTracking/IResultSetTracker.cs b/src/Features/Lsif/Generator/ResultSetTracking/IResultSetTracker.cs index dd0d3acf04169..fe8eee410640f 100644 --- a/src/Features/Lsif/Generator/ResultSetTracking/IResultSetTracker.cs +++ b/src/Features/Lsif/Generator/ResultSetTracking/IResultSetTracker.cs @@ -12,8 +12,23 @@ namespace Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.ResultSetTr /// internal interface IResultSetTracker { + /// + /// Returns the ID of the that represents a symbol. + /// Id GetResultSetIdForSymbol(ISymbol symbol); + + /// + /// Returns an ID of a vertex that is linked from a result set. For example, a has an edge that points to a , and + /// item edges from that are the references for the range. This gives you the ID of the in this case. + /// Id GetResultIdForSymbol(ISymbol symbol, string edgeKind, Func vertexCreator) where T : Vertex; + + /// + /// Similar to , but instead of creating the vertex (if needed) and adding an edge, this + /// simply tracks that this method has been called, and it's up to the caller that got a true return value to create and add the vertex themselves. This is handy + /// when the actual identity of the node isn't needed by any other consumers, or the vertex creation is expensive and we don't want it running under the lock that + /// would have to take. + /// bool ResultSetNeedsInformationalEdgeAdded(ISymbol symbol, string edgeKind); } }