61 references to SourceSpan
Microsoft.AspNetCore.Mvc.Razor.Extensions.UnitTests (2)
RazorPageDocumentClassifierPassTest.cs (2)
31
var sourceSpan = new
SourceSpan
(
63
var sourceSpan = new
SourceSpan
(
Microsoft.AspNetCore.Razor.Language.UnitTests (18)
CodeGeneration\DesignTimeNodeWriterTest.cs (1)
541
builder.Add(IntermediateNodeFactory.CSharpToken("i++", new
SourceSpan
(fileName, 0, 2, 3, 6, 1, 2)));
CodeGeneration\LiteralRuntimeNodeWriterTest.cs (4)
20
builder.Add(IntermediateNodeFactory.CSharpToken("i++", new
SourceSpan
("test.cshtml", 0, 0, 0, 3, 0, 3)));
51
builder.Add(IntermediateNodeFactory.CSharpToken("i++;", new
SourceSpan
("test.cshtml", 0, 0, 0, 4, 0, 4)));
52
builder.Add(IntermediateNodeFactory.CSharpToken("j++;", new
SourceSpan
("test.cshtml", 5, 0, 5, 4, 0, 9)));
53
builder.Add(IntermediateNodeFactory.CSharpToken("k++;", new
SourceSpan
("test.cshtml", 10, 0, 10, 4, 0, 14)));
CodeGeneration\RuntimeNodeWriterTest.cs (3)
144
builder.Add(IntermediateNodeFactory.CSharpToken("i++", new
SourceSpan
("test.cshtml", 0, 0, 0, 3, 0, 3)));
205
builder.Add(IntermediateNodeFactory.CSharpToken("i", new
SourceSpan
("test.cshtml", 0, 0, 0, 1, 0, 1)));
209
builder.Add(IntermediateNodeFactory.CSharpToken("++", new
SourceSpan
("test.cshtml", 2, 0, 2, 2, 0, 4)));
DefaultTagHelperResolutionPhaseTest.cs (9)
15
var first = new
SourceSpan
(filePath, absoluteIndex: 10, lineIndex: 2, characterIndex: 5, length: 3, lineCount: 0, endCharacterIndex: 8);
16
var last = new
SourceSpan
(filePath, absoluteIndex: 15, lineIndex: 2, characterIndex: 10, length: 4, lineCount: 0, endCharacterIndex: 14);
37
var first = new
SourceSpan
(filePath, absoluteIndex: 0, lineIndex: 1, characterIndex: 0, length: 10, lineCount: 1, endCharacterIndex: 5);
39
var last = new
SourceSpan
(filePath, absoluteIndex: 20, lineIndex: 3, characterIndex: 2, length: 5, lineCount: 0, endCharacterIndex: 7);
59
var first = new
SourceSpan
(filePath, absoluteIndex: 5, lineIndex: 0, characterIndex: 5, length: 3, lineCount: 0, endCharacterIndex: 8);
61
var last = new
SourceSpan
(filePath, absoluteIndex: 8, lineIndex: 0, characterIndex: 8, length: 4, lineCount: 0, endCharacterIndex: 12);
78
var span = new
SourceSpan
(filePath, absoluteIndex: 10, lineIndex: 1, characterIndex: 3, length: 5, lineCount: 0, endCharacterIndex: 8);
96
var first = new
SourceSpan
(filePath: null, absoluteIndex: 0, lineIndex: 0, characterIndex: 0, length: 3, lineCount: 0, endCharacterIndex: 3);
97
var last = new
SourceSpan
(filePath: null, absoluteIndex: 5, lineIndex: 0, characterIndex: 5, length: 2, lineCount: 0, endCharacterIndex: 7);
Legacy\CSharpCodeParserTest.cs (1)
187
new
SourceSpan
(
Microsoft.CodeAnalysis.Razor.Compiler (41)
Language\CodeGeneration\CodeRenderingContext.cs (1)
141
var generatedLocation = new
SourceSpan
(
Language\Components\ComponentBindLoweringPass.cs (1)
1092
return new
SourceSpan
(span.FilePath,
Language\Components\ComponentDesignTimeNodeWriter.cs (1)
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 (5)
900
node.Source = new
SourceSpan
(
932
return new
SourceSpan
(
945
return new
SourceSpan
(
961
return new
SourceSpan
(
1020
node.Source = new
SourceSpan
(
Language\DefaultTagHelperResolutionPhase.cs (6)
823
return new
SourceSpan
(
854
new
SourceSpan
(filePath, exprStart, atLoc.Line, atLoc.Character, 1, 0, atLoc.Character + 1)));
865
new
SourceSpan
(filePath, exprStart, loc.Line, loc.Character, exprLength, 0, loc.Character + exprLength)));
886
new
SourceSpan
(filePath, parenStart, openLoc.Line, openLoc.Character, 1, 0, openLoc.Character + 1)));
898
new
SourceSpan
(filePath, innerStart, innerLoc.Line, innerLoc.Character, innerLen, 0, innerLoc.Character + innerLen)));
906
new
SourceSpan
(filePath, closePos, closeLoc.Line, closeLoc.Character, 1, 0, closeLoc.Character + 1)));
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (12)
598
var valueSource = new
SourceSpan
(
676
var emptySource = new
SourceSpan
(atSrc.FilePath, transAbsIdx, atSrc.LineIndex, transCharIdx, 0, 0, transCharIdx);
679
var transSource = new
SourceSpan
(atSrc.FilePath, transAbsIdx, atSrc.LineIndex, transCharIdx, 1, 0, transCharIdx + 1);
691
var openSource = new
SourceSpan
(innerSource.FilePath, openAbsIndex, innerSource.LineIndex, openCharIndex, 1, 0, openCharIndex + 1);
704
var closeSource = new
SourceSpan
(lastSource.FilePath, closeAbsIndex, lastSource.LineIndex, closeCharIndex, 1, 0, closeCharIndex + 1);
740
var openParenSource = new
SourceSpan
(
766
var closeParenSource = new
SourceSpan
(
864
return new
SourceSpan
(
1322
expr.Source = new
SourceSpan
(exprSource.FilePath, contentStart, openLoc.Line, openLoc.Character, contentLength, 0, closeLoc.Character + 1);
1328
var contentSpan = new
SourceSpan
(
1436
emptySpan = new
SourceSpan
(nextSrc.FilePath, nextSrc.AbsoluteIndex, loc.Line, loc.Character, 0, 0, loc.Character);
1613
diagSource = new
SourceSpan
(
Language\SourceSpan.cs (11)
22
:
this
(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, contentLength, lineCount: 1, endCharacterIndex: 0)
27
:
this
(filePath: filePath, absoluteIndex: absoluteIndex, lineIndex: lineIndex, characterIndex: characterIndex, length: length, lineCount: 0, endCharacterIndex: 0)
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);
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);
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);
Language\SpanComputer.cs (1)
115
return new
SourceSpan
(source.FilePath, absoluteIndex: start, startLinePosition.Line, startLinePosition.Character, length, lineCount, endLinePosition.Character);
Language\Syntax\SyntaxNodeExtensions.cs (2)
123
return new
SourceSpan
(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, node.Width, lineCount, endLocation.Character);
131
return new
SourceSpan
(location.FilePath, location.AbsoluteIndex, location.LineIndex, location.CharacterIndex, token.Width, lineCount, endLocation.Character);
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);