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