2 writes to CharacterIndex
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\CodeGeneration\CodeRenderingContext.cs (1)
136CharacterIndex = CodeWriter.Location.CharacterIndex + offset
Language\SourceLocation.cs (1)
60CharacterIndex = characterIndex;
27 references to CharacterIndex
Microsoft.AspNetCore.Razor.Language.UnitTests (9)
Legacy\SourceLocationTrackerTest.cs (7)
29Assert.Equal(19, result.CharacterIndex); 44Assert.Equal(3, currentLocation.CharacterIndex); 58Assert.Equal(46, currentLocation.CharacterIndex); 111Assert.Equal(0, currentLocation.CharacterIndex); 150Assert.Equal(0, currentLocation.CharacterIndex); 189Assert.Equal(46, currentLocation.CharacterIndex); 196var characterIndex = location.CharacterIndex;
SourceLocationTest.cs (2)
22Assert.Equal(24, loc.CharacterIndex); 41Assert.Equal(characterIndex, sourceLocation.CharacterIndex);
Microsoft.CodeAnalysis.Razor.Compiler (16)
Language\CodeGeneration\CodeRenderingContext.cs (3)
136CharacterIndex = CodeWriter.Location.CharacterIndex + offset 139var endCharacterIndex = (source.LineCount == 0) ? currentLocation.CharacterIndex + source.Length : source.EndCharacterIndex; 145currentLocation.CharacterIndex,
Language\Legacy\CSharpCodeParser.cs (5)
1201if (CurrentStart.CharacterIndex > 1) 1204var lineStart = CurrentStart.AbsoluteIndex - CurrentStart.CharacterIndex; 1234directiveStart.CharacterIndex - 1); 1434original.CharacterIndex + offset); 1549directiveStart.CharacterIndex - 1);
Language\Legacy\SourceLocationTracker.cs (1)
18var characterIndex = location.CharacterIndex;
Language\SourceLocation.cs (4)
27/// <see cref="CharacterIndex"/> initialized to 0. 105CharacterIndex); 131CharacterIndex == other.CharacterIndex;
Language\SourceSpan.cs (1)
22: this(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, contentLength, lineCount: 1, endCharacterIndex: 0)
Language\Syntax\SyntaxNodeExtensions.cs (2)
123return new SourceSpan(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, node.Width, lineCount, endLocation.Character); 131return new SourceSpan(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, token.Width, lineCount, endLocation.Character);
Microsoft.CodeAnalysis.Razor.Workspaces (2)
DocumentMapping\RazorEditService_Methods.cs (1)
55var previousLineAbsoluteIndex = closeBraceLocation.AbsoluteIndex - closeBraceLocation.CharacterIndex - 1;
Extensions\SourceLocationExtensions.cs (1)
12=> new(location.LineIndex, location.CharacterIndex);