29 references to SourceLocation
Microsoft.AspNetCore.Razor.Language.UnitTests (11)
IntegrationTests\CodeGenerationIntegrationTest.cs (1)
174{ new(base.GetTestFileName() + ".cshtml", 328, 11, 8), "s" }
Legacy\SourceLocationTrackerTest.cs (2)
20var sourceLocation = new SourceLocation(path, 15, 2, 8); 200return new SourceLocation(location.FilePath, absoluteIndex, lineIndex, characterIndex);
SourceLocationTest.cs (8)
35var sourceLocation = new SourceLocation(filePath, absoluteIndex, lineIndex, characterIndex); 50var sourceLocationA = new SourceLocation(path, 10, 3, 4); 51var sourceLocationB = new SourceLocation(path, 10, 3, 4); 52var sourceLocationC = new SourceLocation(path, 10, 45, 8754); 83var sourceLocationB = new SourceLocation("different-file", 10, 3, 4); 98var sourceLocationA = new SourceLocation(path, 10, 3, 4); 99var sourceLocationB = new SourceLocation(path, 10, 3, 4); 100var sourceLocationC = new SourceLocation("different-path", 10, 3, 4);
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\SyntaxTreeVerifier.cs (1)
123_currentLocation = new SourceLocation(source.FilePath, 0, 0, 0);
Microsoft.CodeAnalysis.Razor.Compiler (17)
Language\Legacy\CSharpCodeParser.cs (3)
1230directiveStart = new SourceLocation( 1430directiveLocation = new SourceLocation( 1545directiveStart = new SourceLocation(
Language\Legacy\SeekableTextReader.cs (4)
68_location = new SourceLocation(_filePath, _position, _cachedLineInfo.LineIndex, _position - _cachedLineInfo.Span.Start); 85_location = new SourceLocation(_filePath, _position, nextLineIndex, _position - nextLineSpan.Start); 100_location = new SourceLocation(_filePath, _position, prevLineIndex, _position - prevLineSpan.Start); 127_location = new SourceLocation(_filePath, Length, lineNumber, SourceText.Lines[lineNumber].Span.Length);
Language\Legacy\SourceLocationTracker.cs (1)
30return new SourceLocation(location.FilePath, absoluteIndex, lineIndex, characterIndex);
Language\SourceLocation.cs (3)
39: this(filePath: null, absoluteIndex: absoluteIndex, lineIndex: lineIndex, characterIndex: characterIndex) 44: this(filePath, absoluteIndex, linePosition.Line, linePosition.Character) 94new SourceLocation(span.Value.FilePath, span.Value.AbsoluteIndex, span.Value.LineIndex, span.Value.CharacterIndex);
Language\Syntax\SyntaxNodeExtensions.cs (6)
55return new SourceLocation(source.FilePath, 0, 0, 0); 63return new SourceLocation( 79return new SourceLocation(source.FilePath, node.Position, 0, 0); 90return new SourceLocation(source.FilePath, 0, 0, 0); 98return new SourceLocation( 114return new SourceLocation(source.FilePath, token.Position, 0, 0);