90 instantiations of LinePositionSpan
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
CompilerFailedExceptionFactoryTest.cs (3)
243new LinePositionSpan(new LinePosition(10, 1), new LinePosition(10, 2)))),
249new LinePositionSpan(new LinePosition(1, 2), new LinePosition(3, 4)))),
255new LinePositionSpan(new LinePosition(30, 5), new LinePosition(40, 12)))),
Microsoft.CodeAnalysis (6)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditAndContinue\ActiveStatementTrackingServiceTests.cs (4)
33var span11 = new LinePositionSpan(new LinePosition(0, 10), new LinePosition(0, 15));
34var span12 = new LinePositionSpan(new LinePosition(0, 20), new LinePosition(0, 25));
35var span21 = new LinePositionSpan(new LinePosition(0, 11), new LinePosition(0, 16));
36var span22 = new LinePositionSpan(new LinePosition(0, 21), new LinePosition(0, 26));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\LocationsTests.cs (3)
504Location location = Location.Create("test.txt", new TextSpan(), new LinePositionSpan(new LinePosition(2, 1), new LinePosition(3, 1)));
515var lineSpan = new LinePositionSpan(new LinePosition(2, 1), new LinePosition(3, 1));
517var mappedLineSpan = new LinePositionSpan(new LinePosition(3, 2), new LinePosition(4, 2));
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.Features (3)
Microsoft.CodeAnalysis.Features.UnitTests (24)
EditAndContinue\ActiveStatementsMapTests.cs (15)
33var span = new LinePositionSpan(new(sl, sc), new(el, ec));
35new LinePositionSpan(new(3, 0), new(3, 1)),
36new LinePositionSpan(new(3, 5), new(3, 6)),
37new LinePositionSpan(new(4, 4), new(4, 18)),
38new LinePositionSpan(new(5, 1), new(5, 2)),
39new LinePositionSpan(new(5, 2), new(5, 8)),
40new LinePositionSpan(new(19, 0), new(19, 42)));
68var span = new LinePositionSpan(new(sl, sc), new(el, ec));
70new LinePositionSpan(new(5, 1), new(5, 2)),
71new LinePositionSpan(new(5, 1), new(5, 8)),
72new LinePositionSpan(new(6, 4), new(6, 18)));
81var span = new LinePositionSpan(new(sl, sc), new(el, ec));
83new LinePositionSpan(new(5, 1), new(5, 2)),
84new LinePositionSpan(new(5, 1), new(5, 3)),
85new LinePositionSpan(new(5, 1), new(5, 8)));
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (7)
431var activeLineSpan = new LinePositionSpan(new(0, 0), new(0, 1));
4034new ActiveStatementSpan(new ActiveStatementId(0), new LinePositionSpan(new(4, 41), new(4, 42)), ActiveStatementFlags.MethodUpToDate | ActiveStatementFlags.LeafFrame),
4131var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
4132var expectedSpanF1 = new LinePositionSpan(new LinePosition(8, 14), new LinePosition(8, 18));
4144var expectedSpanG2 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
4145var expectedSpanF2 = new LinePositionSpan(new LinePosition(9, 14), new LinePosition(9, 18));
4242var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
SemanticTokens\SemanticTokensRangeTests.cs (6)
124new LinePositionSpan(new LinePosition(12, 0), new LinePosition(13, 0)),
125new LinePositionSpan(new LinePosition(29, 0), new LinePosition(30, 0)),
181ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(1, 0), new LinePosition(2, 0))];
231ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(4, 0))];
290ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
371ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (25)
LineMappingTests.cs (24)
19new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
20new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: true)),
21new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 2)), hasMappedPath: false)),
22new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(2, 2)), hasMappedPath: false)),
23new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 1), new LinePosition(1, 1)), hasMappedPath: false)),
24new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(1, 0), new LinePosition(1, 1)), hasMappedPath: false)),
25new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("file.cs", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
26new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), 0, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
27new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 2)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
28new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(2, 2)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
29new LineMapping(new LinePositionSpan(new LinePosition(0, 1), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
30new LineMapping(new LinePositionSpan(new LinePosition(1, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.VisualStudio.LanguageServices (4)
146 references to LinePositionSpan
CSharpSyntaxGenerator (1)
Microsoft.CodeAnalysis (33)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditAndContinue\ActiveStatementTrackingServiceTests.cs (4)
33var span11 = new LinePositionSpan(new LinePosition(0, 10), new LinePosition(0, 15));
34var span12 = new LinePositionSpan(new LinePosition(0, 20), new LinePosition(0, 25));
35var span21 = new LinePositionSpan(new LinePosition(0, 11), new LinePosition(0, 16));
36var span22 = new LinePositionSpan(new LinePosition(0, 21), new LinePosition(0, 26));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (7)
Peek\PeekHelpers.cs (5)
17internal static IDocumentPeekResult CreateDocumentPeekResult(string filePath, LinePositionSpan identifierLocation, LinePositionSpan entityOfInterestSpan, IPeekResultFactory peekResultFactory)
33internal static IDocumentPeekResult CreateDocumentPeekResult(string filePath, LinePositionSpan identifierLocation, LinePositionSpan entityOfInterestSpan, PeekResultDisplayInfo displayInfo, IPeekResultFactory peekResultFactory, bool isReadOnly)
47internal static LinePositionSpan GetEntityOfInterestSpan(ISymbol symbol, Workspace workspace, Location identifierLocation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor (5)
Microsoft.CodeAnalysis.Features (30)
EditAndContinue\ActiveStatementsMap.cs (11)
75if (!TryGetUpToDateSpan(debugInfo, remapping, out var baseSpan))
127private static bool TryGetUpToDateSpan(ManagedActiveStatementDebugInfo activeStatementInfo, ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> remapping, out LinePositionSpan newSpan)
136var activeSpan = activeStatementInfo.SourceSpan.ToLinePositionSpan();
195void AddStatement(LinePositionSpan unmappedLineSpan, ActiveStatement activeStatement)
212var unmappedSection = lineMapping.Span;
230var unmappedLineSpan = ReverseMapLinePositionSpan(unmappedSection, mappedSection.Span, activeStatement.Span);
255private static LinePositionSpan ReverseMapLinePositionSpan(LinePositionSpan unmappedSection, LinePositionSpan mappedSection, LinePositionSpan mappedSpan)
272private static bool TryGetTextSpan(TextLineCollection lines, LinePositionSpan lineSpan, out TextSpan span)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (12)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (8)
431var activeLineSpan = new LinePositionSpan(new(0, 0), new(0, 1));
1034var activeLineSpan1 = CreateText(source1).Lines.GetLinePositionSpan(GetSpan(source1, "System.Console.WriteLine(1);"));
1035var activeLineSpan2 = CreateText(source2).Lines.GetLinePositionSpan(GetSpan(source2, "System.Console.WriteLine(2);"));
4131var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
4132var expectedSpanF1 = new LinePositionSpan(new LinePosition(8, 14), new LinePosition(8, 18));
4144var expectedSpanG2 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
4145var expectedSpanF2 = new LinePositionSpan(new LinePosition(9, 14), new LinePosition(9, 18));
4242var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
SemanticTokens\SemanticTokensRangeTests.cs (5)
123ImmutableArray<LinePositionSpan> spans = [
181ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(1, 0), new LinePosition(2, 0))];
231ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(4, 0))];
290ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
371ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.VisualStudio.LanguageServices (10)