60 instantiations of FileLinePositionSpan
Microsoft.CodeAnalysis (7)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Diagnostics\LocationsTests.cs (5)
316Assert.Equal(flps, new FileLinePositionSpan("c:\\goo.cs", new LinePosition(8, 13), new LinePosition(8, 13)));
334Assert.Equal(flps, new FileLinePositionSpan("c:\\goo.cs", new LinePosition(8, 13), new LinePosition(8, 13)));
354Assert.Equal(flps, new FileLinePositionSpan("c:\\goo.cs", new LinePosition(8, 13), new LinePosition(8, 13)));
379Assert.Equal(flps, new FileLinePositionSpan("c:\\goo.cs", new LinePosition(8, 15), new LinePosition(8, 19)));
419Assert.Equal(span, new FileLinePositionSpan("", new LinePosition(1, 9), new LinePosition(1, 9)));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticDataTests.cs (5)
125location: new DiagnosticDataLocation(new("originalFile1", new(startLine, startColumn), new(endLine, endColumn)), document.Id),
145new(additionalDocument.Name, new(0, 0), new(0, 1)), additionalDocument.Id);
158location: new DiagnosticDataLocation(new FileLinePositionSpan(document.FilePath, span: default), document.Id),
239new(secondDocument.Name, new(0, 0), new(0, 1)), secondDocument.Id);
252location: new DiagnosticDataLocation(new FileLinePositionSpan(firstDocument.FilePath, span: default), firstDocument.Id),
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\DiagnosticProviderTests.vb (2)
358New FileLinePositionSpan(originalFile, New LinePosition(originalLine, originalColumn), New LinePosition(originalLine, originalColumn)),
360If(mappedFile Is Nothing, Nothing, New FileLinePositionSpan(mappedFile, New LinePosition(mappedLine, mappedColumn), New LinePosition(mappedLine, mappedColumn)))),
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.UnitTests (20)
FileLinePositionSpanTests.cs (20)
22EqualityUnit.Create(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)))
23.WithNotEqualValues(new FileLinePositionSpan("C:\\Goo.cs", new LinePosition(1, 2), new LinePosition(3, 5))),
24EqualityUnit.Create(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)))
25.WithNotEqualValues(new FileLinePositionSpan("C:\\bar.cs", new LinePosition(1, 2), new LinePosition(3, 5))),
26EqualityUnit.Create(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)))
27.WithNotEqualValues(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 4), new LinePosition(3, 5))),
28EqualityUnit.Create(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)))
29.WithNotEqualValues(new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(4, 5))));
38var notUsed = new FileLinePositionSpan(null, new LinePosition(1, 2), new LinePosition(3, 5));
44var notUsed = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(3, 2), new LinePosition(2, 4));
50var notUsed = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(1, 1));
64var hash1 = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)).GetHashCode();
65var hash2 = new FileLinePositionSpan("C:\\goo1.cs", new LinePosition(1, 2), new LinePosition(3, 5)).GetHashCode();
66var hash3 = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 3), new LinePosition(3, 5)).GetHashCode();
67var hash4 = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(6, 5)).GetHashCode();
68var hash5 = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(2, 2), new LinePosition(6, 5)).GetHashCode();
69var hash6 = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(2, 2), new LinePosition(6, 8)).GetHashCode();
83Assert.Equal("C:\\goo.cs: (1,2)-(3,5)", new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)).ToString());
84Assert.Equal("\\server\\goo.vb: (1,2)-(3,5)", new FileLinePositionSpan("\\server\\goo.vb", new LinePosition(1, 2), new LinePosition(3, 5)).ToString());
85Assert.Equal("~\\goo.huh: (1,2)-(3,5)", new FileLinePositionSpan("~\\goo.huh", new LinePosition(1, 2), new LinePosition(3, 5)).ToString());
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (3)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.UnitTests (3)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (3)
177location:=New DiagnosticDataLocation(New FileLinePositionSpan("C:\DocumentDiagnostic", Nothing)),
255location:=New DiagnosticDataLocation(New FileLinePositionSpan("C:\ProjectDiagnostic", New LinePosition(4, 4), New LinePosition(4, 4)), documentId:=Nothing),
292location:=New DiagnosticDataLocation(New FileLinePositionSpan("C:\DocumentDiagnostic", Nothing)),
161 references to FileLinePositionSpan
ConfigurationSchemaGenerator (1)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.CodeAnalysis (57)
Syntax\LineDirectiveMap.cs (4)
49public FileLinePositionSpan TranslateSpan(SourceText sourceText, string treeFilePath, TextSpan span)
58protected FileLinePositionSpan TranslateSpan(in LineMappingEntry entry, string treeFilePath, LinePosition unmappedStartPos, LinePosition unmappedEndPos)
111internal abstract FileLinePositionSpan TranslateSpanAndVisibility(SourceText sourceText, string treeFilePath, TextSpan span, out bool isHiddenPosition);
262var mapped = new FileLinePositionSpan(path, mappedSpan, hasMappedPath);
Microsoft.CodeAnalysis.CSharp (13)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (3)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (5)
Microsoft.CodeAnalysis.Features (13)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.UnitTests (3)
FileLinePositionSpanTests.cs (3)
38var notUsed = new FileLinePositionSpan(null, new LinePosition(1, 2), new LinePosition(3, 5));
44var notUsed = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(3, 2), new LinePosition(2, 4));
50var notUsed = new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(1, 1));
Microsoft.CodeAnalysis.VisualBasic (9)
Microsoft.CodeAnalysis.Workspaces (20)
Microsoft.Gen.ComplianceReports (3)
Microsoft.VisualStudio.LanguageServices (8)