1 write to AbsoluteIndex
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\SourceSpan.cs (1)
33
AbsoluteIndex
= absoluteIndex;
123 references to AbsoluteIndex
Microsoft.CodeAnalysis.Razor.Compiler (108)
CSharp\SourceSpanExtensions.cs (1)
15
return new TextSpan(sourceSpan.
AbsoluteIndex
, sourceSpan.Length);
Language\CodeGeneration\CodeRenderingContext.cs (1)
113
return filtered.ToImmutableOrderedBy(static d => d.Span.
AbsoluteIndex
);
Language\CodeGeneration\CodeWriterExtensions.cs (1)
105
for (var i = span.Value.
AbsoluteIndex
- 1; i >= 0; i--)
Language\CodeGeneration\IntermediateNodeWriter.cs (8)
181
var prefixLocation = node.Source.Value.
AbsoluteIndex
;
182
var suffixLocation = node.Source.Value.
AbsoluteIndex
+ node.Source.Value.Length - node.Suffix.Length;
207
var prefixLocation = node.Source.Value.
AbsoluteIndex
;
208
var valueLocation = node.Source.Value.
AbsoluteIndex
+ node.Prefix.Length;
243
var prefixLocation = node.Source.Value.
AbsoluteIndex
;
253
var valueLocation = node.Source.Value.
AbsoluteIndex
+ node.Prefix.Length;
269
var prefixLocation = node.Source.Value.
AbsoluteIndex
;
270
var valueLocation = node.Source.Value.
AbsoluteIndex
+ node.Prefix.Length;
Language\Components\ComponentBindLoweringPass.cs (1)
1125
span.
AbsoluteIndex
+ offset,
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (6)
925
source.
AbsoluteIndex
,
1045
sourceRangeStart.Value.
AbsoluteIndex
,
1607
existingHtmlContent.Source.Value.
AbsoluteIndex
+ existingHtmlContent.Source.Value.Length == source.Value.
AbsoluteIndex
)
1992
existingHtmlContent.Source.Value.
AbsoluteIndex
+ existingHtmlContent.Source.Value.Length == source.Value.
AbsoluteIndex
)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (8)
211
directiveNameSpan = ns.WithAbsoluteIndex(ns.
AbsoluteIndex
+ 1)
886
directiveNameSpan = nameSpan.WithAbsoluteIndex(nameSpan.
AbsoluteIndex
+ 1)
994
? (ls.
AbsoluteIndex
+ ls.Length) - fs.
AbsoluteIndex
1057
return attrSource.WithAbsoluteIndex(attrSource.
AbsoluteIndex
+ nameIndex)
1079
var endIndex = lastSource.
AbsoluteIndex
+ lastSource.Length;
1080
var length = endIndex - childSource.
AbsoluteIndex
;
1110
return attrSource.WithAbsoluteIndex(attrSource.
AbsoluteIndex
+ valueStart)
Language\DefaultTagHelperResolutionPhase.cs (17)
878
var start = Math.Min(a.
AbsoluteIndex
, b.
AbsoluteIndex
);
879
var end = Math.Max(a.
AbsoluteIndex
+ a.Length, b.
AbsoluteIndex
+ b.Length);
880
var first = a.
AbsoluteIndex
<= b.
AbsoluteIndex
? a : b;
881
var last = a.
AbsoluteIndex
+ a.Length >= b.
AbsoluteIndex
+ b.Length ? a : b;
895
Debug.Assert(first.
AbsoluteIndex
<= last.
AbsoluteIndex
,
899
first.
AbsoluteIndex
,
902
last.
AbsoluteIndex
+ last.Length - first.
AbsoluteIndex
,
994
EmitExplicitExpressionTokens(expr, expressionSource.
AbsoluteIndex
, expressionSource.Length, sourceDocument);
996
var exprLoc = sourceDocument.Text.Lines.GetLinePosition(expressionSource.
AbsoluteIndex
);
1082
return s.WithAbsoluteIndex(s.
AbsoluteIndex
- prefixLength)
1192
diagSource = ets.WithAbsoluteIndex(ets.
AbsoluteIndex
+ 2)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (20)
578
var valueStart = attrSource.
AbsoluteIndex
+ prefix.Length;
596
var valueCharIndex = attrSource.CharacterIndex + prefix.Length + (attrSource.
AbsoluteIndex
+ prefix.Length < valueStart ? 1 : 0);
629
if (lastAtTokenSource is SourceSpan last && last.
AbsoluteIndex
== src.
AbsoluteIndex
)
658
if (lastAtTokenSource is SourceSpan last && last.
AbsoluteIndex
== ats.
AbsoluteIndex
)
673
var transAbsIdx = atSrc.
AbsoluteIndex
+ 2;
689
var openAbsIndex = innerSource.
AbsoluteIndex
- 1;
702
var closeAbsIndex = lastSource.
AbsoluteIndex
+ lastSource.Length;
724
var valueStart = attrSource.
AbsoluteIndex
+ prefix.Length;
861
var valueAbsIndex = attrSource.
AbsoluteIndex
+ prefix.Length;
1241
aSource.
AbsoluteIndex
+ aSource.Length == bSource.
AbsoluteIndex
;
1319
var contentStart = exprSource.
AbsoluteIndex
+ 1;
1327
var litEnd = litSrc.
AbsoluteIndex
+ litSrc.Length;
1415
var text = sourceDocument.Text.ToString(new Microsoft.CodeAnalysis.Text.TextSpan(vss.
AbsoluteIndex
, vss.Length));
1455
var loc = sourceDocument.Text.Lines.GetLinePosition(nextSrc.
AbsoluteIndex
);
1456
emptySpan = new SourceSpan(nextSrc.FilePath, nextSrc.
AbsoluteIndex
, loc.Line, loc.Character, 0, 0, loc.Character);
1631
if (diagSource.
AbsoluteIndex
> 0)
1635
diagSource.
AbsoluteIndex
- 1,
Language\Extensions\FunctionsDirectivePass.cs (2)
54
return s_nullableIntComparer.Compare(n1.Node.Source?.
AbsoluteIndex
, n2.Node.Source?.
AbsoluteIndex
);
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (2)
58
if (firstSpan is { } first && lastSpan is { } last && first.
AbsoluteIndex
<= last.
AbsoluteIndex
)
Language\Intermediate\IntermediateNodeExtensions.cs (1)
20
return diagnostics.OrderByAsArray(static d => d.Span.
AbsoluteIndex
);
Language\Legacy\CodeBlockEditHandler.cs (1)
82
var relativePosition = change.Span.
AbsoluteIndex
- target.Position;
Language\Legacy\ImplicitExpressionEditHandler.cs (10)
84
var changeRelativePosition = change.Span.
AbsoluteIndex
- target.Position;
134
change.Span.
AbsoluteIndex
> 0 &&
178
if (tokenEndIndex > change.Span.
AbsoluteIndex
)
180
if (tokenEndIndex >= change.Span.
AbsoluteIndex
+ change.Span.Length && token.Kind == SyntaxKind.Identifier)
185
var transformedContent = change.GetEditedContent(token.Content, change.Span.
AbsoluteIndex
- tokenStartIndex);
233
var changeStart = change.Span.
AbsoluteIndex
;
270
if (IsInsideParenthesis(change.Span.
AbsoluteIndex
, tokens))
433
return change.Span.
AbsoluteIndex
> 0 &&
439
var offset = (change.Span.
AbsoluteIndex
- target.Position) + change.Span.Length;
487
var changeRelativePosition = change.Span.
AbsoluteIndex
- target.Position;
Language\Legacy\LegacySyntaxNodeExtensions.cs (2)
73
if (change.Span.
AbsoluteIndex
< node.Position)
81
if (node.EndPosition < change.Span.
AbsoluteIndex
)
Language\Legacy\SpanEditHandler.cs (4)
79
var changeOldEnd = change.Span.
AbsoluteIndex
+ change.Span.Length;
80
return change.Span.
AbsoluteIndex
>= target.Position &&
115
return (endOfFirstLine == -1 || (change.Span.
AbsoluteIndex
- target.Position) <= endOfFirstLine);
136
return (change.Span.
AbsoluteIndex
+ change.Span.Length) == target.EndPosition;
Language\Legacy\TagHelperParseTreeRewriter.cs (1)
49
var diagnostics = builder.ToImmutableOrderedBy(static d => d.Span.
AbsoluteIndex
);
Language\MarkupSplitter.Slicing.cs (1)
121
AdvanceLocation(source.
AbsoluteIndex
, source.LineIndex, source.CharacterIndex, content, 0, localStart);
Language\RazorDiagnostic.cs (1)
59
builder.Append(span.
AbsoluteIndex
);
Language\RazorSyntaxTree.cs (1)
68
return diagnosticSet.OrderByAsArray(static d => d.Span.
AbsoluteIndex
);
Language\SourceChange.cs (2)
84
var start = Span.
AbsoluteIndex
;
85
var end = Span.
AbsoluteIndex
+ Span.Length;
Language\SourceLocation.cs (1)
94
new SourceLocation(span.Value.FilePath, span.Value.
AbsoluteIndex
, span.Value.LineIndex, span.Value.CharacterIndex);
Language\SourceSpan.cs (14)
65
AbsoluteIndex
== other.
AbsoluteIndex
&&
80
hash.Add(
AbsoluteIndex
);
92
AbsoluteIndex
,
101
return new SourceSpan(FilePath,
AbsoluteIndex
+ Length, LineIndex, characterIndex: EndCharacterIndex, length: 0, lineCount: 0, EndCharacterIndex);
106
return new SourceSpan(FilePath,
AbsoluteIndex
+ startIndex, LineIndex, CharacterIndex + startIndex, length, LineCount, endCharacterIndex: CharacterIndex + startIndex + length);
121
var cmpByStart =
AbsoluteIndex
.CompareTo(other.
AbsoluteIndex
);
130
public readonly SourceSpan WithFilePath(string filePath) => new(filePath,
AbsoluteIndex
, LineIndex, CharacterIndex, Length, LineCount, EndCharacterIndex);
132
public readonly SourceSpan WithLineIndex(int lineIndex) => new(FilePath,
AbsoluteIndex
, lineIndex, CharacterIndex, Length, LineCount, EndCharacterIndex);
133
public readonly SourceSpan WithCharacterIndex(int characterIndex) => 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.Version2_X\InstrumentationPass.cs (1)
40
var absoluteIndex = item.Source.
AbsoluteIndex
.ToString(CultureInfo.InvariantCulture);
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);
Microsoft.CodeAnalysis.Razor.DotNetFormat (12)
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\DocumentMapping\DocumentMappingHelper.cs (2)
17
var originalAbsoluteIndex = originalSpan.
AbsoluteIndex
;
25
csharpIndex = mapping.GeneratedSpan.
AbsoluteIndex
+ distanceIntoOriginalSpan;
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\Passes\CSharpFormattingPass.CSharpDocumentGenerator.cs (9)
105
return $"// {originalSpan.
AbsoluteIndex
} {originalSpan.Length}";
222
if (originalSpan.
AbsoluteIndex
< _currentFirstNonWhitespacePosition)
226
else if (originalSpan.
AbsoluteIndex
> _currentFirstNonWhitespacePosition &&
227
(originalSpan.
AbsoluteIndex
+ originalSpan.Length) <= line.Span.End)
231
var node = root.FindInnermostNode(originalSpan.
AbsoluteIndex
);
302
return mappings.OrderAsArray(static (lhs, rhs) => lhs.
AbsoluteIndex
.CompareTo(rhs.
AbsoluteIndex
));
323
additionalLinesBuilder.AppendLine(_sourceText.ToString(new TextSpan(originalSpan.
AbsoluteIndex
, originalSpan.Length)));
330
additionalLinesBuilder.AppendLine(_sourceText.ToString(new TextSpan(originalSpan.
AbsoluteIndex
, originalSpan.Length)));
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Workspaces.Shared\Extensions\SourceSpanExtensions.cs (1)
12
=> new(span.
AbsoluteIndex
, span.Length);
rzc (3)
Json\ObjectReaders.cs (1)
20
var absoluteIndex = reader.ReadInt32OrZero(nameof(SourceSpan.
AbsoluteIndex
));
Json\ObjectWriters.cs (2)
22
writer.WriteIfNotZero(nameof(span.
AbsoluteIndex
), span.
AbsoluteIndex
);