15 instantiations of LineMapping
Microsoft.CodeAnalysis (3)
Syntax\LineDirectiveMap.cs (3)
245
return new
LineMapping
(unmapped, characterOffset: null, mappedSpan: default);
253
return new
LineMapping
(
263
return new
LineMapping
(unmapped, characterOffset: null, mapped);
Microsoft.CodeAnalysis.UnitTests (12)
LineMappingTests.cs (12)
19
new
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)),
20
new
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)),
21
new
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)),
22
new
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)),
23
new
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)),
24
new
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)),
25
new
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)),
26
new
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)),
27
new
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)),
28
new
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)),
29
new
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)),
30
new
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)),
20 references to LineMapping
Microsoft.CodeAnalysis (11)
Syntax\LineDirectiveMap.cs (2)
172
public IEnumerable<
LineMapping
> GetLineMappings(TextLineCollection lines)
236
private
LineMapping
CreateLineMapping(in LineMappingEntry entry, int unmappedEndLine, int lineLength, int currentIndex)
Syntax\LineMapping.cs (7)
15
public readonly struct LineMapping : IEquatable<
LineMapping
>
48
=> obj is
LineMapping
other && Equals(other);
50
public bool Equals(
LineMapping
other)
56
public static bool operator ==(
LineMapping
left,
LineMapping
right)
59
public static bool operator !=(
LineMapping
left,
LineMapping
right)
Syntax\SyntaxTree.cs (2)
246
/// Otherwise a non-empty sequence of <see cref="
LineMapping
"/>.
248
public abstract IEnumerable<
LineMapping
> GetLineMappings(CancellationToken cancellationToken = default);
Microsoft.CodeAnalysis.CSharp (2)
Syntax\CSharpSyntaxTree.cs (2)
673
public override IEnumerable<
LineMapping
> GetLineMappings(CancellationToken cancellationToken = default)
677
return (map.Entries.Length == 1) ? Array.Empty<
LineMapping
>() : map.GetLineMappings(GetText(cancellationToken).Lines);
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\ActiveStatementsMap.cs (1)
210
foreach (
var
lineMapping in oldTree.GetLineMappings(cancellationToken))
Microsoft.CodeAnalysis.UnitTests (4)
LineMappingTests.cs (4)
17
var lineMappings = new
LineMapping
[]
38
static EqualityUnit<
LineMapping
> CreateEqualityUnit(
LineMapping
left, int leftIndex,
LineMapping
right, int rightIndex)
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\VisualBasicSyntaxTree.vb (2)
462
Public Overrides Function GetLineMappings(Optional cancellationToken As CancellationToken = Nothing) As IEnumerable(Of
LineMapping
)
465
Return If(map.Entries.Length = 1, Array.Empty(Of
LineMapping
)(), map.GetLineMappings(GetText(cancellationToken).Lines))