1 write to LineIndex
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\SourceSpan.cs (1)
34
LineIndex
= lineIndex;
67 references to LineIndex
Microsoft.AspNetCore.Razor.Language.UnitTests (12)
DefaultTagHelperResolutionPhaseTest.cs (3)
24
Assert.Equal(2, result.
LineIndex
); // same line as first
47
Assert.Equal(1, result.
LineIndex
); // line of first
85
Assert.Equal(1, result.
LineIndex
);
IntegrationTests\ComponentDiagnosticRazorIntegrationTest.cs (2)
78
Assert.Equal(0, item.Span.
LineIndex
);
87
Assert.Equal(1, item.Span.
LineIndex
);
IntegrationTests\ComponentImportsIntegrationTest.cs (6)
86
Assert.Equal(0, item.Span.
LineIndex
);
92
Assert.Equal(1, item.Span.
LineIndex
);
98
Assert.Equal(2, item.Span.
LineIndex
);
175
Assert.Equal(0, item.Span.
LineIndex
);
181
Assert.Equal(1, item.Span.
LineIndex
);
187
Assert.Equal(2, item.Span.
LineIndex
);
SourceChangeTest.cs (1)
26
Assert.Equal(-1, change.Span.
LineIndex
);
Microsoft.AspNetCore.Razor.Test.Common (10)
Language\IntegrationTests\IntegrationTestBase.cs (3)
599
if (classifiedSpan.Span.
LineIndex
>= linePragma.StartLineIndex &&
600
classifiedSpan.Span.
LineIndex
<= linePragma.EndLineIndex)
608
Assert.True(foundMatchingPragma, $"No line pragma found for code '{content}' at line {classifiedSpan.Span.
LineIndex
+ 1}.");
Language\IntegrationTests\IntermediateNodeWriter.cs (1)
321
_writer.Write(sourceRange.
LineIndex
);
Language\IntegrationTests\RazorBaselineIntegrationTestBase.cs (6)
171
if (sourceMapping.OriginalSpan.
LineIndex
>= linePragma.StartLineIndex &&
172
sourceMapping.OriginalSpan.
LineIndex
<= linePragma.EndLineIndex)
180
Assert.True(foundMatchingPragma, $"No line pragma found for code at line {sourceMapping.OriginalSpan.
LineIndex
+ 1}.");
198
if (classifiedSpan.Span.
LineIndex
>= linePragma.StartLineIndex &&
199
classifiedSpan.Span.
LineIndex
<= linePragma.EndLineIndex)
207
Assert.True(foundMatchingPragma, $"No line pragma found for code '{content}' at line {classifiedSpan.Span.
LineIndex
+ 1}.");
Microsoft.CodeAnalysis.Razor.Compiler (42)
Language\CodeGeneration\CodeRenderingContextExtensions.cs (1)
132
_span.
LineIndex
,
Language\CodeGeneration\CodeWriterExtensions.cs (3)
307
.WriteIntegerLiteral(span.
LineIndex
+ 1)
311
.WriteIntegerLiteral(span.
LineIndex
+ 1 + span.LineCount)
334
.WriteIntegerLiteral(span.
LineIndex
+ 1)
Language\Components\ComponentBindLoweringPass.cs (1)
1094
span.
LineIndex
,
Language\Components\ComponentDesignTimeNodeWriter.cs (1)
691
attributeSourceSpan = new SourceSpan(attributeSourceSpan.FilePath, attributeSourceSpan.AbsoluteIndex + offset, attributeSourceSpan.
LineIndex
, attributeSourceSpan.CharacterIndex + offset, node.PropertyName.Length, attributeSourceSpan.LineCount, attributeSourceSpan.CharacterIndex + offset + node.PropertyName.Length);
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (2)
903
source.
LineIndex
,
1023
sourceRangeStart.Value.
LineIndex
,
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (2)
1069
.WithLineCount(lastSource.
LineIndex
- childSource.
LineIndex
)
Language\DefaultTagHelperResolutionPhase.cs (5)
808
var lineCount = (last.
LineIndex
+ last.LineCount) - first.
LineIndex
;
826
first.
LineIndex
,
829
last.
LineIndex
+ last.LineCount - first.
LineIndex
,
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (9)
599
attrSource.FilePath, valueStart, attrSource.
LineIndex
, valueCharIndex,
676
var emptySource = new SourceSpan(atSrc.FilePath, transAbsIdx, atSrc.
LineIndex
, transCharIdx, 0, 0, transCharIdx);
679
var transSource = new SourceSpan(atSrc.FilePath, transAbsIdx, atSrc.
LineIndex
, transCharIdx, 1, 0, transCharIdx + 1);
691
var openSource = new SourceSpan(innerSource.FilePath, openAbsIndex, innerSource.
LineIndex
, openCharIndex, 1, 0, openCharIndex + 1);
704
var closeSource = new SourceSpan(lastSource.FilePath, closeAbsIndex, lastSource.
LineIndex
, closeCharIndex, 1, 0, closeCharIndex + 1);
741
attrSource.FilePath, openParenAbsIndex, attrSource.
LineIndex
, openParenCharIndex,
767
attrSource.FilePath, closeParenAbsIndex, attrSource.
LineIndex
, closeParenCharIndex,
867
attrSource.
LineIndex
,
1616
diagSource.
LineIndex
,
Language\RazorDiagnostic.cs (2)
60
builder.Append(span.
LineIndex
);
121
return $"{span.FilePath}({span.
LineIndex
+ 1},{span.CharacterIndex + 1}): {severity} {id}: {message}";
Language\SourceLocation.cs (1)
94
new SourceLocation(span.Value.FilePath, span.Value.AbsoluteIndex, span.Value.
LineIndex
, span.Value.CharacterIndex);
Language\SourceSpan.cs (12)
66
LineIndex
== other.
LineIndex
&&
81
hash.Add(
LineIndex
);
93
LineIndex
,
101
return new SourceSpan(FilePath, AbsoluteIndex + Length,
LineIndex
, characterIndex: EndCharacterIndex, length: 0, lineCount: 0, EndCharacterIndex);
106
return new SourceSpan(FilePath, AbsoluteIndex + startIndex,
LineIndex
, CharacterIndex + startIndex, length, LineCount, endCharacterIndex: CharacterIndex + startIndex + length);
130
public readonly SourceSpan WithFilePath(string filePath) => new(filePath, AbsoluteIndex,
LineIndex
, CharacterIndex, Length, LineCount, EndCharacterIndex);
131
public readonly SourceSpan WithAbsoluteIndex(int absoluteIndex) => new(FilePath, absoluteIndex,
LineIndex
, CharacterIndex, Length, LineCount, EndCharacterIndex);
133
public readonly SourceSpan WithCharacterIndex(int characterIndex) => new(FilePath, AbsoluteIndex,
LineIndex
, characterIndex, Length, LineCount, EndCharacterIndex);
134
public readonly SourceSpan WithLength(int length) => new(FilePath, AbsoluteIndex,
LineIndex
, CharacterIndex, length, LineCount, EndCharacterIndex);
135
public readonly SourceSpan WithLineCount(int lineCount) => new(FilePath, AbsoluteIndex,
LineIndex
, CharacterIndex, Length, lineCount, EndCharacterIndex);
136
public readonly SourceSpan WithEndCharacterIndex(int endCharacterIndex) => new(FilePath, AbsoluteIndex,
LineIndex
, CharacterIndex, Length, LineCount, endCharacterIndex);
Mvc\InjectDirective.cs (1)
92
typeSpan = new SourceSpan(typeSpan.Value.FilePath, typeSpan.Value.AbsoluteIndex, typeSpan.Value.
LineIndex
, typeSpan.Value.CharacterIndex, typeSpan.Value.Length - tModel.Length, typeSpan.Value.LineCount, typeSpan.Value.EndCharacterIndex - tModel.Length);
SourceGenerators\Diagnostics\RazorDiagnostics.cs (2)
118
new LinePosition(span.
LineIndex
, span.CharacterIndex),
119
new LinePosition(span.
LineIndex
, span.CharacterIndex + span.Length));
Microsoft.CodeAnalysis.Razor.Workspaces (3)
DocumentMapping\AbstractDocumentMappingService.cs (1)
187
mapping.OriginalSpan.
LineIndex
== hostDocumentLine &&
Extensions\SourceSpanExtensions.cs (2)
16
var start = new LinePosition(span.
LineIndex
, span.CharacterIndex);
17
var end = new LinePosition(span.
LineIndex
+ span.LineCount, span.EndCharacterIndex);