24 writes to Range
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.Razor.Workspaces (3)
Microsoft.CodeAnalysis.Remote.Razor (2)
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (2)
Microsoft.VisualStudioCode.RazorExtension.UnitTests (2)
192 references to Range
IdeBenchmarks (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (115)
CallHierarchy\CallHierarchyTests.cs (9)
43Assert.Equal(0, CompareRange(definition.Range, preparedItem.SelectionRange));
82Assert.Equal(0, CompareRange(typeLocation.Range, constructorCall.To.SelectionRange));
86Assert.Equal(0, CompareRange(methodLocation.Range, methodCall.To.SelectionRange));
130Assert.Equal(0, CompareRange(firstCallerLocation.Range, firstCaller.From.SelectionRange));
131Assert.Equal(0, CompareRange(secondCallerLocation.Range, secondCaller.From.SelectionRange));
170Assert.Equal(0, CompareRange(testLspServer.GetLocations("method").Single().Range, methodCall.To.SelectionRange));
171Assert.Equal(0, CompareRange(testLspServer.GetLocations("property").Single().Range, propertyCall.To.SelectionRange));
172Assert.Equal(0, CompareRange(testLspServer.GetLocations("field").Single().Range, fieldCall.To.SelectionRange));
185Position = caret.Range.Start,
Completion\CompletionFeaturesTests.cs (17)
85Position = caret.Range.Start,
359await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s"));
463Position = caret.Range.Start,
657Position = caret.Range.Start,
669Assert.Equal(new() { Start = new(2, 0), End = caret.Range.Start }, results.ItemDefaults.EditRange.Value.First);
764Position = caret.Range.Start,
798Position = caret.Range.Start,
814await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "i"));
868await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s"));
966Position = caret.Range.Start,
1035Position = caret.Range.Start,
1092Position = caret.Range.Start,
1111await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "f"));
Completion\CompletionTests.cs (18)
1052await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "a"));
1120await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "C"));
1189await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "ask"));
1201await testLspServer.DeleteTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, caretLocation.Range.End.Line, caretLocation.Range.End.Character + 3));
1214await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "i"));
1415await testLspServer.InsertTextAsync(secondCaretLocation.DocumentUri, (secondCaretLocation.Range.End.Line, secondCaretLocation.Range.End.Character, "S"));
1430await testLspServer.InsertTextAsync(firstCaretLocation.DocumentUri, (firstCaretLocation.Range.End.Line, firstCaretLocation.Range.End.Character, "a"));
1532await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "z"));
Rename\RenameTests.cs (12)
49var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
104var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
149var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
185var expectedMappedRanges = ImmutableArray.Create(TestSpanMapper.MappedFileLocation.Range, TestSpanMapper.MappedFileLocation.Range);
229var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
282var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
337var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
389var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
394ProtocolConversions.PositionToLinePosition(renameLocation.Range.Start),
455var expectedEdits = testLspServer.GetLocations("renamed").Select(location => new LSP.TextEdit() { NewText = renameValue, Range = location.Range });
520Position = location.Range.Start,
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.Razor.Workspaces (2)
Microsoft.CodeAnalysis.Remote.Razor (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Microsoft.VisualStudio.LanguageServices.Razor (2)
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (30)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostGoToDefinitionEndpointTest.cs (21)
87var line = File.ReadLines(location.DocumentUri.GetRequiredParsedUri().LocalPath).ElementAt(location.Range.Start.Line);
160Assert.Equal(range, location.Range);
195Assert.Equal(range, location.Range);
228Assert.Equal(range, location.Range);
261Assert.Equal(range, location.Range);
299Assert.Equal(range, location.Range);
341Assert.Equal(range, location.Range);
383Assert.Equal(range, location.Range);
430Assert.Equal(range, location.Range);
492Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
528Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
572Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
610Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
655Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
719Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
783Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
870Assert.Equal(expected.Spans[0], SourceText.From(expected.Text).GetTextSpan(location.Range));
874Assert.Equal(expected.Spans[1], SourceText.From(expected.Text).GetTextSpan(location.Range));
980var line = File.ReadLines(location.DocumentUri.GetRequiredParsedUri().LocalPath).ElementAt(location.Range.Start.Line);
1033Assert.Equal(range, location.Range);
1053Assert.Equal(range, location.Range);
Microsoft.VisualStudioCode.RazorExtension (2)
Microsoft.VisualStudioCode.RazorExtension.UnitTests (30)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostGoToDefinitionEndpointTest.cs (21)
87var line = File.ReadLines(location.DocumentUri.GetRequiredParsedUri().LocalPath).ElementAt(location.Range.Start.Line);
160Assert.Equal(range, location.Range);
195Assert.Equal(range, location.Range);
228Assert.Equal(range, location.Range);
261Assert.Equal(range, location.Range);
299Assert.Equal(range, location.Range);
341Assert.Equal(range, location.Range);
383Assert.Equal(range, location.Range);
430Assert.Equal(range, location.Range);
492Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
528Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
572Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
610Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
655Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
719Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
783Assert.Equal(expected.Span, SourceText.From(expected.Text).GetTextSpan(location.Range));
870Assert.Equal(expected.Spans[0], SourceText.From(expected.Text).GetTextSpan(location.Range));
874Assert.Equal(expected.Spans[1], SourceText.From(expected.Text).GetTextSpan(location.Range));
980var line = File.ReadLines(location.DocumentUri.GetRequiredParsedUri().LocalPath).ElementAt(location.Range.Start.Line);
1033Assert.Equal(range, location.Range);
1053Assert.Equal(range, location.Range);