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