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