1 write to LineCount
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\SourceSpan.cs (1)
38LineCount = lineCount;
25 references to LineCount
Microsoft.AspNetCore.Razor.Language.UnitTests (4)
DefaultTagHelperResolutionPhaseTest.cs (4)
27Assert.Equal(0, result.LineCount); // 2 + 0 - 2 = 0 (same line) 50Assert.Equal(2, result.LineCount); // (3 + 0) - 1 = 2 69Assert.Equal(0, result.LineCount); 88Assert.Equal(0, result.LineCount); // 1 + 0 - 1 = 0
Microsoft.CodeAnalysis.Razor.Compiler (20)
Language\CodeGeneration\CodeRenderingContext.cs (2)
139var endCharacterIndex = (source.LineCount == 0) ? currentLocation.CharacterIndex + source.Length : source.EndCharacterIndex; 147lineCount: source.LineCount,
Language\CodeGeneration\CodeWriterExtensions.cs (1)
311.WriteIntegerLiteral(span.LineIndex + 1 + span.LineCount)
Language\Components\ComponentBindLoweringPass.cs (1)
1097span.LineCount,
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)
906source.LineCount, 1026sourceRangeStart.Value.LineCount,
Language\DefaultTagHelperResolutionPhase.cs (2)
808var lineCount = (last.LineIndex + last.LineCount) - first.LineIndex; 829last.LineIndex + last.LineCount - first.LineIndex,
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (2)
600valueLength, attrSource.LineCount, valueEndCharIndex); 1619diagSource.LineCount,
Language\RazorDiagnostic.cs (1)
63builder.Append(span.LineCount);
Language\SourceSpan.cs (7)
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); 132public readonly SourceSpan WithLineIndex(int lineIndex) => 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); 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);
Microsoft.CodeAnalysis.Razor.Workspaces (1)
Extensions\SourceSpanExtensions.cs (1)
17var end = new LinePosition(span.LineIndex + span.LineCount, span.EndCharacterIndex);