1 write to CharacterIndex
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\SourceSpan.cs (1)
35CharacterIndex = characterIndex;
49 references to CharacterIndex
Microsoft.AspNetCore.Razor.Language.UnitTests (6)
DefaultTagHelperResolutionPhaseTest.cs (3)
25Assert.Equal(5, result.CharacterIndex); // same column as first 48Assert.Equal(0, result.CharacterIndex); // column of first 86Assert.Equal(3, result.CharacterIndex);
IntegrationTests\ComponentDiagnosticRazorIntegrationTest.cs (2)
79Assert.Equal(0, item.Span.CharacterIndex); 88Assert.Equal(0, item.Span.CharacterIndex);
SourceChangeTest.cs (1)
23Assert.Equal(-1, change.Span.CharacterIndex);
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\IntegrationTests\IntermediateNodeWriter.cs (1)
323_writer.Write(sourceRange.CharacterIndex);
Microsoft.CodeAnalysis.Razor.Compiler (41)
Language\CodeGeneration\CodeWriterExtensions.cs (1)
309.WriteIntegerLiteral(span.CharacterIndex + 1)
Language\Components\ComponentBindLoweringPass.cs (1)
1095span.CharacterIndex + offset,
Language\Components\ComponentDesignTimeNodeWriter.cs (2)
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)
904source.CharacterIndex, 1024sourceRangeStart.Value.CharacterIndex,
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (6)
199.WithCharacterIndex(ns.CharacterIndex + 1) 209.WithEndCharacterIndex(ps.CharacterIndex + nameWithoutParamLen); 872.WithCharacterIndex(nameSpan.CharacterIndex + 1) 1039var nameCharIndex = attrSource.CharacterIndex + nameIndex; 1065var endCharIndex = lastSource.CharacterIndex + lastSource.Length; 1092var valueCharIndex = attrSource.CharacterIndex + valueStart;
Language\DefaultTagHelperResolutionPhase.cs (4)
827first.CharacterIndex, 1009.WithCharacterIndex(s.CharacterIndex - prefixLength) 1104.WithCharacterIndex(ets.CharacterIndex + 2) 1107.WithEndCharacterIndex(ets.CharacterIndex + 2 + tagName.Length);
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (7)
596var valueCharIndex = attrSource.CharacterIndex + prefix.Length + (attrSource.AbsoluteIndex + prefix.Length < valueStart ? 1 : 0); 674var transCharIdx = atSrc.CharacterIndex + 2; 690var openCharIndex = innerSource.CharacterIndex - 1; 739var openParenCharIndex = attrSource.CharacterIndex + prefix.Length + 1; 765var closeParenCharIndex = attrSource.CharacterIndex + prefix.Length + valueLength - 1; 862var valueCharIndex = attrSource.CharacterIndex + prefix.Length; 1617diagSource.CharacterIndex - 1,
Language\RazorDiagnostic.cs (2)
61builder.Append(span.CharacterIndex); 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)
67CharacterIndex == other.CharacterIndex && 82hash.Add(CharacterIndex); 94CharacterIndex, 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); 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 (1)
Extensions\SourceSpanExtensions.cs (1)
16var start = new LinePosition(span.LineIndex, span.CharacterIndex);