96 instantiations of SourceLocation
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 (68)
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");
IntegrationTests\CodeGenerationIntegrationTest.cs (1)
174{ new(base.GetTestFileName() + ".cshtml", 328, 11, 8), "s" }
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 (3)
12private static readonly SourceLocation TestStartLocation = new SourceLocation(10, 42, 45); 20var sourceLocation = new SourceLocation(path, 15, 2, 8); 200return new SourceLocation(location.FilePath, absoluteIndex, lineIndex, characterIndex);
SourceLocationTest.cs (12)
16var loc = new SourceLocation(0, 42, 24); 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); 68var sourceLocationA = new SourceLocation(10, 3, 4); 69var sourceLocationB = new SourceLocation(10, 45, 8754); 82var sourceLocationA = new SourceLocation(10, 3, 4); 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);
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.AspNetCore.Razor.Test.Common (1)
Language\SyntaxTreeVerifier.cs (1)
123_currentLocation = new SourceLocation(source.FilePath, 0, 0, 0);
Microsoft.CodeAnalysis.Razor.Compiler (22)
Language\CodeGeneration\CodeWriter.cs (1)
152public SourceLocation Location => new(_absoluteIndex, _currentLineIndex, _currentLineCharacterIndex);
Language\Legacy\CSharpCodeParser.cs (3)
1230directiveStart = new SourceLocation( 1430directiveLocation = new SourceLocation( 1545directiveStart = new SourceLocation(
Language\Legacy\LocationTagged.cs (1)
17: this(value, new SourceLocation(absoluteIndex, lineIndex, characterIndex))
Language\Legacy\SeekableTextReader.cs (5)
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); 108_location = new SourceLocation(_filePath, _position, SourceText.Lines.GetLinePosition(_position)); 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)
23new SourceLocation(absoluteIndex: -1, lineIndex: -1, characterIndex: -1); 30new SourceLocation(absoluteIndex: 0, lineIndex: 0, characterIndex: 0); 94new SourceLocation(span.Value.FilePath, span.Value.AbsoluteIndex, span.Value.LineIndex, span.Value.CharacterIndex);
Language\Syntax\SyntaxNodeExtensions.cs (8)
55return new SourceLocation(source.FilePath, 0, 0, 0); 63return new SourceLocation( 71return new SourceLocation( 79return new SourceLocation(source.FilePath, node.Position, 0, 0); 90return new SourceLocation(source.FilePath, 0, 0, 0); 98return new SourceLocation( 106return new SourceLocation( 114return new SourceLocation(source.FilePath, token.Position, 0, 0);
Microsoft.CodeAnalysis.Razor.Workspaces (1)
Extensions\SourceTextExtensions.cs (1)
292location = new SourceLocation(absoluteIndex, line, character);
215 references to SourceLocation
Microsoft.AspNetCore.Razor.Language.Legacy.UnitTests (13)
Legacy\ImplicitExpressionEditHandlerTest.cs (13)
19var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); 33var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); 47var span = GetSyntaxNode(SourceLocation.Zero, "(Hell)(o)"); 61var span = GetSyntaxNode(SourceLocation.Zero, "(H(ell)o)"); 354var tokens = GetTokens(SourceLocation.Zero, "(hello)point(world)"); 367var tokens = GetTokens(SourceLocation.Zero, "(hello))point)"); 380var tokens = GetTokens(SourceLocation.Zero, "Hello World"); 393var tokens = GetTokens(SourceLocation.Zero, "Foo(GetValue(), DoSomething(point))"); 408var span = GetSyntaxNode(SourceLocation.Zero, "(Hello World)"); 422var span = GetSyntaxNode(SourceLocation.Zero, "(Hello"); 436var span = GetSyntaxNode(SourceLocation.Zero, "(Hello)"); 446private static Syntax.MarkupTextLiteralSyntax GetSyntaxNode(SourceLocation start, string content) 460private static Syntax.SyntaxTokenList GetTokens(SourceLocation start, string content)
Microsoft.AspNetCore.Razor.Language.UnitTests (96)
CodeGeneration\CSharpCodeWriterTest.cs (36)
40var location = writer.Location; 41var expected = new SourceLocation(absoluteIndex: 4, lineIndex: 0, characterIndex: 4); 57var location = writer.Location; 58var expected = new SourceLocation(absoluteIndex: 3 + WriterNewLineLength, lineIndex: 1, characterIndex: 3); 73var location = writer.Location; 75var expected = new SourceLocation(absoluteIndex: 4 + WriterNewLineLength, lineIndex: 1, characterIndex: 0); 91var location = writer.Location; 93var expected = new SourceLocation( 112var location = writer.Location; 114var expected = new SourceLocation( 132var location = writer.Location; 134var expected = new SourceLocation( 152var location = writer.Location; 154var expected = new SourceLocation( 170var location1 = writer.Location; 173var location2 = writer.Location; 176var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); 179var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 1, characterIndex: 0); 191var location1 = writer.Location; 194var location2 = writer.Location; 197var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); 200var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); 212var location1 = writer.Location; 215var location2 = writer.Location; 218var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); 221var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); 233var location1 = writer.Location; 236var location2 = writer.Location; 239var expected1 = new SourceLocation(absoluteIndex: 5, lineIndex: 1, characterIndex: 0); 242var expected2 = new SourceLocation(absoluteIndex: 6, lineIndex: 2, characterIndex: 0); 254var location1 = writer.Location; 257var location2 = writer.Location; 260var expected1 = new SourceLocation(absoluteIndex: 1, lineIndex: 1, characterIndex: 0); 263var expected2 = new SourceLocation(absoluteIndex: 2, lineIndex: 1, characterIndex: 0); 275var location = writer.Location; 278var expected = new SourceLocation(absoluteIndex: 12, lineIndex: 1, characterIndex: 5);
DefaultRazorTagHelperBinderPhaseTest.cs (1)
478new SourceSpan(SourceLocation.Zero, contentLength: 1));
Legacy\CodeBlockEditHandlerTest.cs (13)
20var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 34var span = GetSpan(SourceLocation.Zero, "Hello <div>@world</div>."); 48var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 62var span = GetSpan(SourceLocation.Zero, "Hello <div></div>."); 76var span = GetSpan(SourceLocation.Zero, "Hello @"); 90var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 104var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 118var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 132var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 146var span = GetSpan(SourceLocation.Zero, "world"); 160var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 174var span = GetSpan(SourceLocation.Zero, "Hello {world}."); 283private static SyntaxNode GetSpan(SourceLocation start, string content)
Legacy\CSharpCodeParserTest.cs (5)
15public static TheoryData<string, SourceLocation, IEnumerable<RazorDiagnostic>> InvalidTagHelperPrefixData 19var directiveLocation = new SourceLocation(1, 2, 3); 27return new TheoryData<string, SourceLocation, IEnumerable<RazorDiagnostic>> 107SourceLocation directiveLocation, 139var result = CSharpCodeParser.ParseAddOrRemoveDirective(directive, SourceLocation.Zero, diagnostics);
Legacy\SourceLocationTrackerTest.cs (29)
12private static readonly SourceLocation TestStartLocation = new SourceLocation(10, 42, 45); 20var sourceLocation = new SourceLocation(path, 15, 2, 8); 23var result = SourceLocationTracker.Advance(sourceLocation, "Hello world"); 36var location = TestStartLocation; 39var currentLocation = SourceLocationTracker.Advance(location, "foo\nbar\rbaz\r\nbox"); 52var location = TestStartLocation; 55var currentLocation = UpdateLocation(location, 'f', 'o'); 66var location = TestStartLocation; 69var currentLocation = UpdateLocation(location, 'f', 'o'); 79var location = TestStartLocation; 82var currentLocation = UpdateLocation(location, '\n', 'o'); 92var location = TestStartLocation; 95var currentLocation = UpdateLocation(location, '\n', 'o'); 105var location = TestStartLocation; 108var currentLocation = UpdateLocation(location, '\n', 'o'); 118var location = TestStartLocation; 121var currentLocation = UpdateLocation(location, '\r', 'o'); 131var location = TestStartLocation; 134var currentLocation = UpdateLocation(location, '\r', 'o'); 144var location = TestStartLocation; 147var currentLocation = UpdateLocation(location, '\r', 'o'); 157var location = TestStartLocation; 160var currentLocation = UpdateLocation(location, '\r', '\n'); 170var location = TestStartLocation; 173var currentLocation = UpdateLocation(location, '\r', '\n'); 183var location = TestStartLocation; 186var currentLocation = UpdateLocation(location, '\r', '\n'); 192private static SourceLocation UpdateLocation(SourceLocation location, char v1, char v2)
SourceLocationTest.cs (12)
16var loc = new SourceLocation(0, 42, 24); 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); 68var sourceLocationA = new SourceLocation(10, 3, 4); 69var sourceLocationB = new SourceLocation(10, 45, 8754); 82var sourceLocationA = new SourceLocation(10, 3, 4); 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 (5)
Language\IntegrationTests\IntegrationTestBase.cs (3)
103protected Dictionary<SourceLocation, string>? ExpectedMissingSourceMappings { get; set; } 551if (ExpectedMissingSourceMappings?.TryGetValue(SourceLocation.FromSpan(sourceSpan), out var expectedMissingSpan) == true) 563ExpectedMissingSourceMappings.Remove(SourceLocation.FromSpan(sourceSpan));
Language\SyntaxTreeVerifier.cs (2)
116private SourceLocation _currentLocation; 134var start = token.GetSourceLocation(_source);
Microsoft.CodeAnalysis.Razor.Compiler (92)
Language\CodeGeneration\CodeRenderingContext.cs (1)
133var currentLocation = CodeWriter.Location with
Language\CodeGeneration\CodeWriter.cs (1)
152public SourceLocation Location => new(_absoluteIndex, _currentLineIndex, _currentLineCharacterIndex);
Language\DefaultDirectiveSyntaxTreePass.cs (1)
83var directiveStart = node.Transition.GetSourceLocation(_syntaxTree.Source);
Language\Legacy\CSharpCodeParser.cs (18)
808var location = CurrentStart; 1226var directiveStart = CurrentStart; 1312Func<string, List<RazorDiagnostic>, SourceLocation, ISpanChunkGenerator> chunkGeneratorFactory) 1324SourceLocation? valueStartLocation = null; 1327var keywordStartLocation = CurrentStart; 1396SourceLocation directiveLocation, 1429var original = directiveLocation; 1453internal static ParsedDirective ParseAddOrRemoveDirective(ParsedDirective directive, SourceLocation directiveLocation, List<RazorDiagnostic> errors) 1507SourceLocation directiveLocation, 1541var directiveStart = CurrentStart; 1940private void ValidateDirectiveUsage(DirectiveDescriptor descriptor, SourceLocation directiveStart) 2017private void ParseDirectiveBlock(in SyntaxListBuilder<RazorSyntaxNode> builder, DirectiveDescriptor descriptor, Action<SyntaxListBuilder<RazorSyntaxNode>, SourceLocation> parseChildren) 2038var startingBraceLocation = CurrentStart; 2569var start = CurrentStart; 2924var start = CurrentStart; 2938private bool Balance(SyntaxListBuilder<RazorSyntaxNode> builder, BalancingModes mode, SyntaxKind left, SyntaxKind right, SourceLocation start) 3116public Block(string name, SourceLocation start) 3123public SourceLocation Start { get; set; }
Language\Legacy\DirectiveHtmlTokenizer.cs (3)
14private SourceLocation _firstTokenVisitLocation = SourceLocation.Undefined; 18var location = CurrentLocation;
Language\Legacy\HtmlMarkupParser.cs (13)
489var tagStart = CurrentStart; 516var endTagStart = CurrentStart; 550SourceLocation endTagStartLocation, 634SourceLocation tagStartLocation, 791var textLocation = CurrentStart; 961var textLocation = CurrentStart; 1367var prefixStart = CurrentStart; 1415var valueStart = CurrentStart; 1493var tagStart = CurrentStart; 1527var tagStart = CurrentStart; 2186var bookmark = CurrentStart; 2366SourceLocation tagLocation, 2381public SourceLocation TagLocation { get; }
Language\Legacy\LanguageCharacteristics.cs (2)
22return TokenizeString(SourceLocation.Zero, content); 25public virtual IEnumerable<SyntaxToken> TokenizeString(SourceLocation start, string input)
Language\Legacy\LocationTagged.cs (2)
21public LocationTagged(TValue value, SourceLocation location) 32public SourceLocation Location { get; }
Language\Legacy\SeekableTextReader.cs (3)
16private SourceLocation _location; 35public SourceLocation Location => _location; 120_location = SourceLocation.Zero;
Language\Legacy\SourceLocationTracker.cs (4)
11public static SourceLocation Advance(SourceLocation location, string text) => 14public static SourceLocation Advance(SourceLocation location, ReadOnlySpan<char> text)
Language\Legacy\TagHelperBlockRewriter.cs (2)
77var attributeNameLocation = SourceLocation.Undefined;
Language\Legacy\TagHelperParseTreeRewriter.cs (7)
511var errorStart = GetStartTagDeclarationErrorStart(tag, _source); 528var errorStart = GetEndTagDeclarationErrorStart(tag, _source); 581var errorStart = SourceLocationTracker.Advance(child.GetSourceLocation(_source), whitespace); 701var errorStart = GetStartTagDeclarationErrorStart(tagBlock, source); 719var errorStart = GetEndTagDeclarationErrorStart(tagBlock, source); 729private static SourceLocation GetStartTagDeclarationErrorStart(MarkupStartTagSyntax tagBlock, RazorSourceDocument source) 734private static SourceLocation GetEndTagDeclarationErrorStart(MarkupEndTagSyntax tagBlock, RazorSourceDocument source)
Language\Legacy\Tokenizer.cs (2)
62public SourceLocation CurrentLocation => Source.Location; 64public SourceLocation CurrentStart { get; private set; }
Language\Legacy\TokenizerBackedParser.cs (2)
83protected SourceLocation CurrentStart => _tokenizer.Tokenizer.CurrentStart; 372var start = CurrentStart;
Language\SourceLocation.cs (19)
17public struct SourceLocation : IEquatable<SourceLocation> 20/// An undefined <see cref="SourceLocation"/>. 22public static readonly SourceLocation Undefined = 26/// A <see cref="SourceLocation"/> with <see cref="AbsoluteIndex"/>, <see cref="LineIndex"/>, and 29public static readonly SourceLocation Zero = 33/// Initializes a new instance of <see cref="SourceLocation"/>. 49/// Initializes a new instance of <see cref="SourceLocation"/>. 84/// Creates a new instance of <see cref="SourceLocation"/> from the provided span. 87/// The source span. If <c>null</c>, <see cref="SourceLocation.Undefined"/> will be returned. 89/// <remarks>A <see cref="SourceLocation"/> that corresponds to the beginning of the span.</remarks> 90public static SourceLocation FromSpan(SourceSpan? span) 93SourceLocation.Undefined : 111return obj is SourceLocation && 112Equals((SourceLocation)obj); 126public bool Equals(SourceLocation other) 134public static bool operator ==(SourceLocation left, SourceLocation right) 139public static bool operator !=(SourceLocation left, SourceLocation right)
Language\SourceSpan.cs (2)
14public static readonly SourceSpan Undefined = new SourceSpan(SourceLocation.Undefined, 0); 21public SourceSpan(SourceLocation location, int contentLength)
Language\Syntax\SyntaxNodeExtensions.cs (5)
43public static SourceLocation GetSourceLocation(this SyntaxNodeOrToken nodeOrToken, RazorSourceDocument source) 48public static SourceLocation GetSourceLocation(this SyntaxNode node, RazorSourceDocument source) 83public static SourceLocation GetSourceLocation(this SyntaxToken token, RazorSourceDocument source) 120var location = node.GetSourceLocation(source); 128var location = token.GetSourceLocation(source);
Mvc\RazorExtensionsDiagnosticFactory.cs (5)
22new SourceSpan(SourceLocation.Undefined, contentLength: 0), 35new SourceSpan(SourceLocation.Undefined, contentLength: 0), 48new SourceSpan(SourceLocation.Undefined, contentLength: 0), 61new SourceSpan(SourceLocation.Undefined, contentLength: 0), 73new SourceSpan(SourceLocation.Undefined, contentLength: 0),
Microsoft.CodeAnalysis.Razor.Workspaces (9)
DocumentMapping\RazorEditService_Methods.cs (1)
47var closeBraceLocation = closeBrace.GetSourceLocation(source);
Extensions\LspExtensions_SourceText.cs (1)
42public static bool TryGetSourceLocation(this SourceText text, Position position, out SourceLocation location)
Extensions\RazorSyntaxNodeExtensions.cs (1)
213var location = node.GetSourceLocation(sourceDocument);
Extensions\RazorSyntaxTokenExtensions.cs (1)
68var location = token.GetSourceLocation(source);
Extensions\SourceLocationExtensions.cs (1)
11public static LinePosition ToLinePosition(this SourceLocation location)
Extensions\SourceTextExtensions.cs (2)
285public static bool TryGetSourceLocation(this SourceText text, LinePosition position, out SourceLocation location) 288public static bool TryGetSourceLocation(this SourceText text, int line, int character, out SourceLocation location)
LinkedEditingRange\LinkedEditingRangeHelper.cs (2)
22if (!codeDocument.Source.Text.TryGetSourceLocation(linePosition, out var validLocation)) 45SourceLocation location,