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