2 instantiations of SelectionRange
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\SelectionRanges\SelectionRangeHandler.cs (2)
75
current = new
SelectionRange
83
return current ?? new
SelectionRange
{ Range = ProtocolConversions.TextSpanToRange(new TextSpan(position, 0), text) };
16 references to SelectionRange
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Handler\SelectionRanges\SelectionRangeHandler.cs (5)
21
internal sealed class SelectionRangeHandler() : ILspServiceDocumentRequestHandler<SelectionRangeParams,
SelectionRange
[]?>
28
public async Task<
SelectionRange
[]?> HandleRequestAsync(SelectionRangeParams request, RequestContext context, CancellationToken cancellationToken)
37
using var _ = ArrayBuilder<
SelectionRange
>.GetInstance(out var results);
49
private static
SelectionRange
GetSelectionRange(SyntaxNode root, SourceText text, int position)
72
SelectionRange
? current = null;
Protocol\Methods.Document.cs (1)
119
public static readonly LspRequest<SelectionRangeParams,
SelectionRange
[]?> TextDocumentSelectionRange = new(TextDocumentSelectionRangeName);
Protocol\SelectionRange.cs (1)
33
public
SelectionRange
? Parent { get; init; }
Protocol\SelectionRangeParams.cs (2)
17
internal sealed class SelectionRangeParams : ITextDocumentParams, IWorkDoneProgressParams, IPartialResultParams<
SelectionRange
[]>
41
public IProgress<
SelectionRange
[]>? PartialResultToken { get; set; }
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
SelectionRanges\SelectionRangesTests.cs (7)
184
var results = await testLspServer.ExecuteRequestAsync<LSP.SelectionRangeParams, LSP.
SelectionRange
[]>(
197
var
result = await RunGetSelectionRangeAsync(testLspServer, caret);
202
for (
var
current = result; current is not null; current = current.Parent)
219
private static async Task<LSP.
SelectionRange
?> RunGetSelectionRangeAsync(TestLspServer testLspServer, LSP.Location caret)
228
var results = await testLspServer.ExecuteRequestAsync<LSP.SelectionRangeParams, LSP.
SelectionRange
[]>(
234
private static void AssertRangeChainIsNestedCorrectly(LSP.
SelectionRange
selectionRange)
236
var
current = selectionRange;