1 instantiation of Range
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Graph\Range.cs (1)
29
return new
Range
(start: ConvertLinePositionToPosition(linePositionSpan.Start), end: ConvertLinePositionToPosition(linePositionSpan.End), idFactory);
25 references to Range
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (10)
Generator.cs (6)
197
/// The high level algorithm here is we are going to walk across each token, produce a <see cref="Graph.
Range
"/> for that token's span,
222
var rangeVertices = new List<Id<Graph.
Range
>>();
258
List<Id<Graph.
Range
>> rangeVertices,
299
var lazyRangeVertex = new Lazy<Graph.
Range
>(() =>
301
var
rangeVertex = Graph.
Range
.FromTextSpan(syntaxToken.Span, sourceText, idFactory);
Graph\Item.cs (2)
16
public Item(Id<Vertex> outVertex, Id<
Range
> range, Id<LsifDocument> document, IdFactory idFactory, string? property = null)
17
: base(label: "item", outVertex, new[] { range.As<
Range
, Vertex>() }, idFactory)
Graph\LsifDocument.cs (1)
10
/// Represents the document vertex that contains all the <see cref="
Range
"/>s. See https://github.com/Microsoft/language-server-protocol/blob/master/indexFormat/specification.md#ranges for examples.
Graph\Range.cs (1)
25
public static
Range
FromTextSpan(TextSpan textSpan, SourceText sourceText, IdFactory idFactory)
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests (15)
RangeResultSetTests.vb (5)
80
Dim referencedRange = Assert.Single(lsif.GetLinkedVertices(Of Graph.
Range
)(definitionsVertex, "item"))
100
Dim referencedRange = Assert.Single(lsif.GetLinkedVertices(Of Graph.
Range
)(referencesVertex, "item"))
132
Dim referencedRanges = lsif.GetLinkedVertices(Of Graph.
Range
)(referencesVertex, "item")
171
For Each range In lsif.GetLinkedVertices(Of Graph.
Range
)(document, "contains")
238
Dim definitionRangesForImplementingMethods = lsif.GetLinkedVertices(Of Graph.
Range
)(referencesVertex, Function(e) DirectCast(e, Graph.Item).Property = "definitions")
Utilities\TestLsifOutput.vb (10)
86
Private Async Function GetRangesAsync(selector As Func(Of TestHostDocument, IEnumerable(Of TextSpan))) As Task(Of IEnumerable(Of Graph.
Range
))
87
Dim builder = ImmutableArray.CreateBuilder(Of
Range
)
94
Dim rangeVertices = GetLinkedVertices(Of
Range
)(documentVertex, "contains")
100
Dim positionStart =
Range
.ConvertLinePositionToPosition(linePositionSpan.Start)
101
Dim positionEnd =
Range
.ConvertLinePositionToPosition(linePositionSpan.End)
113
''' Returns the <see cref="
Range
" /> vertices in the output that corresponds to the selected range in the <see cref="TestWorkspace" />.
115
Public Function GetSelectedRangesAsync() As Task(Of IEnumerable(Of Graph.
Range
))
119
Public Async Function GetSelectedRangeAsync() As Task(Of Graph.
Range
)
123
Public Function GetAnnotatedRangesAsync(annotation As String) As Task(Of IEnumerable(Of Graph.
Range
))
127
Public Async Function GetAnnotatedRangeAsync(annotation As String) As Task(Of Graph.
Range
)