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