66 references to new
Microsoft.AspNetCore.Razor.Language.Legacy.UnitTests (4)
Legacy\ImplicitExpressionEditHandlerTest.cs (4)
300
var token = GetTokens(new
SourceLocation
(4, 1, 2), "hello").Single();
313
var token = GetTokens(new
SourceLocation
(4, 1, 2), "hello").Single();
326
var token = GetTokens(new
SourceLocation
(4, 1, 2), "hello").Single();
341
var token = GetTokens(new
SourceLocation
(4, 1, 2), "hello").Single();
Microsoft.AspNetCore.Razor.Language.UnitTests (57)
CodeGeneration\CSharpCodeWriterTest.cs (18)
41
var expected = new
SourceLocation
(absoluteIndex: 4, lineIndex: 0, characterIndex: 4);
58
var expected = new
SourceLocation
(absoluteIndex: 3 + WriterNewLineLength, lineIndex: 1, characterIndex: 3);
75
var expected = new
SourceLocation
(absoluteIndex: 4 + WriterNewLineLength, lineIndex: 1, characterIndex: 0);
93
var expected = new
SourceLocation
(
114
var expected = new
SourceLocation
(
134
var expected = new
SourceLocation
(
154
var expected = new
SourceLocation
(
176
var expected1 = new
SourceLocation
(absoluteIndex: 5, lineIndex: 1, characterIndex: 0);
179
var expected2 = new
SourceLocation
(absoluteIndex: 6, lineIndex: 1, characterIndex: 0);
197
var expected1 = new
SourceLocation
(absoluteIndex: 5, lineIndex: 1, characterIndex: 0);
200
var expected2 = new
SourceLocation
(absoluteIndex: 6, lineIndex: 2, characterIndex: 0);
218
var expected1 = new
SourceLocation
(absoluteIndex: 5, lineIndex: 1, characterIndex: 0);
221
var expected2 = new
SourceLocation
(absoluteIndex: 6, lineIndex: 2, characterIndex: 0);
239
var expected1 = new
SourceLocation
(absoluteIndex: 5, lineIndex: 1, characterIndex: 0);
242
var expected2 = new
SourceLocation
(absoluteIndex: 6, lineIndex: 2, characterIndex: 0);
260
var expected1 = new
SourceLocation
(absoluteIndex: 1, lineIndex: 1, characterIndex: 0);
263
var expected2 = new
SourceLocation
(absoluteIndex: 2, lineIndex: 1, characterIndex: 0);
278
var expected = new
SourceLocation
(absoluteIndex: 12, lineIndex: 1, characterIndex: 5);
DefaultRazorTagHelperBinderPhaseTest.cs (7)
29
new SourceSpan(new
SourceLocation
(14 + Environment.NewLine.Length, 1, 14), contentLength: 1)),
31
new SourceSpan(new
SourceLocation
(14 + Environment.NewLine.Length, 1, 14), contentLength: 1), "\"")
58
new SourceSpan(new
SourceLocation
(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)),
60
new SourceSpan(new
SourceLocation
(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "\"")
87
new SourceSpan(new
SourceLocation
(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)),
89
new SourceSpan(new
SourceLocation
(17 + Environment.NewLine.Length, 1, 17), contentLength: 1), "tagHelperPrefix", '\"', "\""),
480
new SourceSpan(new
SourceLocation
((Environment.NewLine.Length * 2) + 30, 2, 1), contentLength: 4), "form");
Legacy\CSharpCodeParserTest.cs (3)
19
var directiveLocation = new
SourceLocation
(1, 2, 3);
170
new SourceSpan(new
SourceLocation
(1, 2, 3), errorLength), directiveText);
173
var result = CSharpCodeParser.ParseAddOrRemoveDirective(directive, new
SourceLocation
(1, 2, 3), diagnostics);
Legacy\SourceLocationTrackerTest.cs (1)
12
private static readonly SourceLocation TestStartLocation = new
SourceLocation
(10, 42, 45);
SourceLocationTest.cs (4)
16
var loc = new
SourceLocation
(0, 42, 24);
68
var sourceLocationA = new
SourceLocation
(10, 3, 4);
69
var sourceLocationB = new
SourceLocation
(10, 45, 8754);
82
var sourceLocationA = new
SourceLocation
(10, 3, 4);
SourceSpanTest.cs (24)
18
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
19
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
22
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
23
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
36
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
37
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
40
new SourceSpan(new
SourceLocation
(1, 2, 3), 5),
41
new SourceSpan(new
SourceLocation
(5, 6, 7), 9));
52
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
53
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
56
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
57
new SourceSpan(new
SourceLocation
(5, 6, 8), 8));
68
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
69
new SourceSpan(new
SourceLocation
(5, 6, 8), 8));
72
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
73
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
84
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
85
new SourceSpan(new
SourceLocation
(5, 5, 7), 8));
88
new SourceSpan(new
SourceLocation
(1, 1, 3), 4),
89
new SourceSpan(new
SourceLocation
(5, 6, 7), 8));
100
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
101
new SourceSpan(new
SourceLocation
(4, 6, 7), 8));
104
new SourceSpan(new
SourceLocation
(1, 2, 3), 4),
105
new SourceSpan(new
SourceLocation
(5, 6, 7), 9));
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\CodeGeneration\CodeWriter.cs (1)
152
public SourceLocation Location =>
new
(_absoluteIndex, _currentLineIndex, _currentLineCharacterIndex);
Language\Legacy\LocationTagged.cs (1)
17
: this(value, new
SourceLocation
(absoluteIndex, lineIndex, characterIndex))
Language\SourceLocation.cs (2)
23
new
SourceLocation
(absoluteIndex: -1, lineIndex: -1, characterIndex: -1);
30
new
SourceLocation
(absoluteIndex: 0, lineIndex: 0, characterIndex: 0);
Microsoft.CodeAnalysis.Razor.Workspaces (1)
Extensions\SourceTextExtensions.cs (1)
292
location = new
SourceLocation
(absoluteIndex, line, character);