18 writes to Range
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Extensions\ProtocolConversions.cs (3)
383Range = location.Range, 502Range = MappedSpanResultToRange(mappedSpan) 532Range = TextSpanToRange(span, text),
Extensions\ProtocolConversions.Diagnostics.cs (1)
94Range = GetRange(l),
Handler\Definitions\AbstractGoToDefinitionHandler.cs (1)
92Range = ProtocolConversions.LinePositionToRange(linePosSpan),
Handler\References\FindUsagesLSPContext.cs (1)
286Range = ProtocolConversions.LinePositionToRange(linePosSpan),
Handler\Symbols\DocumentSymbolsHandler.cs (1)
98Range = ProtocolConversions.TextSpanToRange(symbolItem.Location.InDocumentInfo.Value.navigationSpan, text),
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Definitions\GoToDefinitionTests.cs (1)
98Range = new LSP.Range { Start = position, End = position }
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
106Range = new LSP.Range
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
76var caret = new LSP.Location { Range = new() { Start = new(0, 6), End = new(0, 7) }, DocumentUri = looseFileUri }; 298Range = new LSP.Range
References\FindImplementationsTests.cs (1)
100Range = new LSP.Range { Start = position, End = position }
Rename\RenameTests.cs (1)
178Range = new LSP.Range { Start = startPosition, End = endPosition }
Workspaces\SourceGeneratedDocumentTests.cs (1)
94var location = new LSP.Location { DocumentUri = sourceGeneratorDocumentUri, Range = new LSP.Range { Start = new LSP.Position(0, 6), End = new LSP.Position(0, 6) } };
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Utilities\AbstractLanguageServerClientTests.cs (1)
115Range = ProtocolConversions.TextSpanToRange(span, text),
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (3)
136Range = ProtocolConversions.TextSpanToRange(sourceDefinition.Span.Value, sourceText) 148Range = new LSP.Range() { Start = position, End = position } 186Range = ProtocolConversions.LinePositionToRange(linePosSpan),
110 references to Range
IdeBenchmarks (1)
Lsp\LspCompletionSerializationBenchmarks.cs (1)
109Position = caret.Range.Start,
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Extensions\ProtocolConversions.cs (1)
383Range = location.Range,
Handler\MapCode\MapCodeHandler.cs (1)
134builder.Add((document, ProtocolConversions.RangeToTextSpan(location.Range, focusText)));
Protocol\Location.cs (3)
59EqualityComparer<Range>.Default.Equals(this.Range, other.Range); 65hashCode = (hashCode * -1521134295) + EqualityComparer<Range>.Default.GetHashCode(this.Range);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (102)
CodeActions\CodeActionsTests.cs (6)
118Range = caret.Range, 159Range = caret.Range, 199Range = caret.Range, 242Range = caret.Range, 290Range = caret.Range, 331Range = caret.Range,
CodeActions\RunCodeActionsTests.cs (1)
45var commandArgument = new CodeActionResolveData(string.Format(FeaturesResources.Move_type_to_0, "B.cs"), customTags: [], caretLocation.Range, documentId, fixAllFlavors: null, nestedCodeActions: null, codeActionPath: titlePath);
CodeLens\AbstractCodeLensTests.cs (2)
42var matchingCodeLenses = actualCodeLenses.Where(actualCodeLens => actualCodeLens.Range == expectedCodeLens.Range); 70.Where(actualCodeLens => actualCodeLens.Range == expectedCodeLens.Range)
Completion\CompletionFeaturesTests.cs (17)
85Position = caret.Range.Start, 358await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 462Position = caret.Range.Start, 656Position = caret.Range.Start, 668Assert.Equal(new() { Start = new(2, 0), End = caret.Range.Start }, results.ItemDefaults.EditRange.Value.First); 763Position = caret.Range.Start, 797Position = caret.Range.Start, 813await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "i")); 867await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 965Position = caret.Range.Start, 1034Position = caret.Range.Start, 1090Position = caret.Range.Start, 1109await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "f"));
Completion\CompletionResolveTests.cs (1)
392var editRange = testLspServer.GetLocations("editRange").Single().Range;
Completion\CompletionTests.cs (18)
992await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "a")); 1060await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "C")); 1129await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "ask")); 1141await testLspServer.DeleteTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, caretLocation.Range.End.Line, caretLocation.Range.End.Character + 3)); 1154await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "i")); 1355await testLspServer.InsertTextAsync(secondCaretLocation.DocumentUri, (secondCaretLocation.Range.End.Line, secondCaretLocation.Range.End.Character, "S")); 1370await testLspServer.InsertTextAsync(firstCaretLocation.DocumentUri, (firstCaretLocation.Range.End.Line, firstCaretLocation.Range.End.Character, "a")); 1472await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "z"));
DataTips\DataTipRangeHandlerTests.cs (1)
25Position = caret.Range.Start,
Diagnostics\PullDiagnosticTests.cs (13)
537var locationToReplace = testLspServer.GetLocations("caret").Single().Range; 590var locationToReplace = testLspServer.GetLocations("caret").Single().Range; 690var textEdit = new LSP.TextEdit { Range = textLocation.Range, NewText = "partial " }; 771var firstLocation = testLspServer.GetLocations("first").Single().Range; 811var firstLocation = testLspServer.GetLocations("first").Single().Range; 839var openLocation = testLspServer.GetLocations("open").Single().Range; 840var closeLocation = testLspServer.GetLocations("close").Single().Range; 841var lineLocation = testLspServer.GetLocations("line").Single().Range; 871Assert.Equal(openLocation, results.Single().Diagnostics!.Single().RelatedInformation![0].Location.Range); 874Assert.Equal(closeLocation, results.Single().Diagnostics!.Single().RelatedInformation![1].Location.Range); 1673var caretLocation = testLspServer.GetLocations("caret").First().Range; 1761var caretLocation = testLspServer.GetLocations("caret").First().Range; 1831var caretLocation = testLspServer.GetLocations("caret").First().Range;
FoldingRanges\FoldingRangesTests.cs (1)
71.SelectMany(kvp => kvp.Value.Select(location => CreateFoldingRange(kvp.Key, location.Range, collapsedText ?? "...")))
Formatting\FormatDocumentOnTypeTests.cs (1)
127Position = locationTyped.Range.Start,
Formatting\FormatDocumentRangeTests.cs (1)
101Range = location.Range,
Highlights\DocumentHighlightTests.cs (4)
77Assert.Equal(expectedLocations[0].Range, results[0].Range); 78Assert.Equal(expectedLocations[1].Range, results[1].Range); 79Assert.Equal(expectedLocations[2].Range, results[2].Range); 119Range = location.Range
InlayHint\AbstractInlayHintTests.cs (1)
46var matchingInlayHints = actualInlayHints.Where(actualInlayHints => actualInlayHints.Position == location.Range.Start);
InlineCompletions\InlineCompletionsTests.cs (1)
268Position = locationTyped.Range.Start,
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (4)
312Assert.Equal(0, result.Single().Range.Start.Line); 313Assert.Equal(6, result.Single().Range.Start.Character); 314Assert.Equal(0, result.Single().Range.End.Line); 315Assert.Equal(7, result.Single().Range.End.Character);
OnAutoInsert\OnAutoInsertTests.cs (1)
400Position = locationTyped.Range.Start,
References\FindAllReferencesHandlerTests.cs (1)
348Position = caret.Range.Start,
Rename\PrepareRenameTests.cs (4)
33Assert.Equal(testLspServer.GetLocations("range").Single().Range, results); 52Assert.Equal(testLspServer.GetLocations("range").Single().Range, results); 72Assert.Equal(testLspServer.GetLocations("range").Single().Range, results); 98Position = location.Range.Start,
Rename\RenameTests.cs (9)
48var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 103var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 148var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 184var expectedMappedRanges = ImmutableArray.Create(TestSpanMapper.MappedFileLocation.Range, TestSpanMapper.MappedFileLocation.Range); 228var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 273var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 323var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range }); 337Position = location.Range.Start,
SemanticTokens\AbstractSemanticTokensTests.cs (1)
63Range = location.Range
SimplifyMethod\SimplifyMethodTests.cs (2)
42Range = methodInsertionLocation.Range, 59TextEdit = new TextEdit() { Range = location.Range, NewText = newText },
Symbols\DocumentSymbolsTests.cs (2)
256Range = location.Range, 262SelectionRange = selection.Range
ValidateBreakableRange\ValidateBreakableRangeTests.cs (10)
34var expected = testLspServer.GetLocations("expected").Single().Range; 59var expected = caret.Range; 103var expected = testLspServer.GetLocations("expected").Single().Range; 126var expected = breakpoint.Range; 150var expected = breakpoint.Range; 175var expected = testLspServer.GetLocations("expected").Single().Range; 204var expected = testLspServer.GetLocations("expected").Single().Range; 229var expected = testLspServer.GetLocations("expected").Single().Range; 253var expected = testLspServer.GetLocations("expected").Single().Range; 266Range = caret.Range
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Utilities\AbstractLanguageServerClientTests.cs (1)
143Range = location.Range,
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
311var textSpan = ProtocolConversions.RangeToTextSpan(location.Range, text);