111 references to SourceSpan
Microsoft.AspNetCore.Razor.Language.UnitTests (34)
DefaultRazorTagHelperBinderPhaseTest.cs (8)
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", '\"', "\""),
478
new
SourceSpan
(SourceLocation.Zero, contentLength: 1));
480
new
SourceSpan
(new SourceLocation((Environment.NewLine.Length * 2) + 30, 2, 1), contentLength: 4), "form");
Legacy\CSharpCodeParserTest.cs (2)
24
new
SourceSpan
(directiveLocation, length), SyntaxConstants.CSharp.TagHelperPrefixKeyword, character, prefix);
170
new
SourceSpan
(new SourceLocation(1, 2, 3), errorLength), directiveText);
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 (77)
Language\DefaultDirectiveSyntaxTreePass.cs (1)
85
var error = RazorDiagnosticFactory.CreateParsing_SectionsCannotBeNested(new
SourceSpan
(directiveStart, errorLength));
Language\Legacy\CSharpCodeParser.cs (40)
354
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length));
412
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length)));
418
new
SourceSpan
(CurrentStart, contentLength: 1 /* end of file */)));
424
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length),
468
new
SourceSpan
(block.Start, contentLength: 1 /* ( */), block.Name, ")", "("));
725
new
SourceSpan
(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{"));
852
new
SourceSpan
(location, contentLength: 1 /* @ */)));
890
new
SourceSpan
(block.Start, contentLength: 1 /* { OR } */), block.Name, "}", "{"));
952
new
SourceSpan
(CurrentStart, contentLength: 1 /* { */)));
1077
new
SourceSpan
(CurrentStart, contentLength: 1 /* @ */)));
1153
new
SourceSpan
(CurrentStart, contentLength: 1 /* @ */)));
1214
new
SourceSpan
(CurrentStart, currentDirective.Length), currentDirective));
1238
new
SourceSpan
(directiveStart, errorLength),
1350
new
SourceSpan
(keywordStartLocation, keywordLength), keyword));
1372
new
SourceSpan
(valueStartLocation.Value, rawValue.Length), keyword));
1461
new
SourceSpan
(directiveLocation, Math.Max(text?.Length ?? 0, 1)), text ?? string.Empty));
1517
new
SourceSpan
(directiveLocation, prefix.Length),
1577
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1630
new
SourceSpan
(CurrentStart, contentLength: 1),
1644
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1656
new
SourceSpan
(CurrentStart, identifierLength), descriptor.Directive));
1673
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1688
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1703
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1721
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1742
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, CurrentToken.Content, lastSeenMemberIdentifier ?? string.Empty));
1772
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length),
1795
new
SourceSpan
(CurrentStart, identifierLength), descriptor.Directive));
1835
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length),
1950
new
SourceSpan
(directiveStart, errorLength), descriptor.Directive));
2023
new
SourceSpan
(CurrentStart, contentLength: 1 /* { */), descriptor.Directive, "{"));
2029
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, "{"));
2059
new
SourceSpan
(startingBraceLocation, contentLength: 1 /* } */), descriptor.Directive, "}", "{"));
2221
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length)));
2229
new
SourceSpan
(CurrentStart, contentLength: 2 /* @: */)));
2237
new
SourceSpan
(CurrentStart, contentLength: 2 /* @@ */)));
2499
new
SourceSpan
(block.Start, block.Name.Length)));
2747
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length), CurrentToken.Content));
2930
new
SourceSpan
(start, contentLength: 1 /* { OR } */),
3007
new
SourceSpan
(start, contentLength: 1 /* { OR } */),
Language\Legacy\HtmlMarkupParser.cs (8)
160
new
SourceSpan
(CurrentStart, CurrentToken.Content.Length)));
338
new
SourceSpan
(
559
new
SourceSpan
(SourceLocationTracker.Advance(endTagStartLocation, "</"), Math.Max(endTagName.Length, 1)), endTagName));
575
new
SourceSpan
(
695
new
SourceSpan
(
821
new
SourceSpan
(textLocation, contentLength: 4 /* text */)));
976
new
SourceSpan
(textLocation, contentLength: 4 /* text */)));
1553
new
SourceSpan
(SourceLocationTracker.Advance(tagStart, "</"), ScriptTagName.Length),
Language\Legacy\NativeCSharpTokenizer.cs (3)
561
new
SourceSpan
(CurrentStart, contentLength: 1 /* end of file */)));
591
new
SourceSpan
(CurrentStart, contentLength: 1 /* " */)));
608
new
SourceSpan
(CurrentStart, contentLength: 1 /* end of file */)));
Language\Legacy\RoslynCSharpTokenizer.cs (5)
393
new
SourceSpan
(CurrentStart, contentLength: expectedPrefix?.Length ?? 0 /* " */)));
500
new
SourceSpan
(CurrentStart, contentLength: 1 /* end of file */)));
528
new
SourceSpan
(CurrentStart, contentLength: trivia.FullSpan.Length)));
546
new
SourceSpan
(CurrentStart, contentLength: trivia.FullSpan.Length)));
556
new
SourceSpan
(CurrentStart, contentLength: directiveTrivia.FullSpan.Length)));
Language\Legacy\TagHelperBlockRewriter.cs (3)
113
var location = new
SourceSpan
(codeBlock.GetSourceLocation(source), codeBlock.Width);
190
var errorLocation = new
SourceSpan
(attributeNameLocation, result.AttributeName.Length);
200
var errorLocation = new
SourceSpan
(attributeNameLocation, result.AttributeName.Length);
Language\Legacy\TagHelperParseTreeRewriter.cs (9)
142
var source = new
SourceSpan
(SourceLocationTracker.Advance(startTag.GetSourceLocation(_source), "<"), tagName.Length);
187
new
SourceSpan
(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length), tagName));
368
new
SourceSpan
(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length),
493
new
SourceSpan
(tagBlock.GetSourceLocation(_source), tagBlock.Width),
515
new
SourceSpan
(errorStart, tagName.Length), tagName));
532
new
SourceSpan
(errorStart, tagName.Length), tagName));
587
new
SourceSpan
(errorStart, length),
705
new
SourceSpan
(errorStart, tagName.Length),
723
new
SourceSpan
(errorStart, tagName.Length),
Language\Legacy\TokenizerBackedParser.cs (2)
385
new
SourceSpan
(start, contentLength: 2 /* @* */));
395
new
SourceSpan
(start, contentLength: 2 /* @* */));
Language\SourceSpan.cs (1)
14
public static readonly SourceSpan Undefined = new
SourceSpan
(SourceLocation.Undefined, 0);
Mvc\RazorExtensionsDiagnosticFactory.cs (5)
22
new
SourceSpan
(SourceLocation.Undefined, contentLength: 0),
35
new
SourceSpan
(SourceLocation.Undefined, contentLength: 0),
48
new
SourceSpan
(SourceLocation.Undefined, contentLength: 0),
61
new
SourceSpan
(SourceLocation.Undefined, contentLength: 0),
73
new
SourceSpan
(SourceLocation.Undefined, contentLength: 0),