2 overrides of GetLocation
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
767public override Location GetLocation(TextSpan span)
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicSyntaxTree.vb (1)
491Public Overrides Function GetLocation(span As TextSpan) As Location
108 references to GetLocation
Microsoft.CodeAnalysis (4)
Syntax\SyntaxNode.cs (1)
672return this.SyntaxTree.GetLocation(this.Span);
Syntax\SyntaxReference.cs (1)
52return this.SyntaxTree.GetLocation(this.Span);
Syntax\SyntaxToken.cs (1)
651: tree.GetLocation(Span);
Syntax\SyntaxTrivia.cs (1)
412return this.SyntaxTree!.GetLocation(this.Span);
Microsoft.CodeAnalysis.CodeStyle (9)
AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
73Diagnostic.Create(Descriptor, context.Tree.GetLocation(
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
70node.SyntaxTree.GetLocation(GetFadeSpan(node)),
AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (2)
153yield return Diagnostic.Create(descriptor, tree.GetLocation(span)); 166yield return Diagnostic.Create(s_fixableIdDescriptor, tree.GetLocation(span));
AbstractSimplifyInterpolationHelpers.cs (1)
50.SelectAsArray(interpolation.Syntax.SyntaxTree.GetLocation);
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
149syntaxTree.GetLocation(TextSpan.FromBounds(match.SpanStart, arguments[0].SpanStart)), 150syntaxTree.GetLocation(TextSpan.FromBounds(arguments.Last().FullSpan.End, match.Span.End)));
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
146syntaxTree.GetLocation(TextSpan.FromBounds(match.Initializer.FullSpan.End, match.Statement.Span.End)))));
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
166var diagnostic = DiagnosticHelper.Create(descriptor, tree.GetLocation(issueSpan), severity, additionalLocations: null, builder.ToImmutable());
Microsoft.CodeAnalysis.CSharp (2)
Compilation\CSharpCompilation.cs (2)
2405diagnostics.Add(code, infoTree.GetLocation(infoSpan)); 2708var location = syntaxTree.GetLocation(TextSpan.FromBounds(0, 0));
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
51: declaration.SyntaxTree.GetLocation(TextSpan.FromBounds(declaration.SpanStart, declaration.SemicolonToken.Span.End));
ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
55: declaration.SyntaxTree.GetLocation(TextSpan.FromBounds(declaration.SpanStart, declaration.Name.Span.End));
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (3)
210syntaxTree.GetLocation(startReportSpan), 214syntaxTree.GetLocation(startReportSpan), 215syntaxTree.GetLocation(endReportSpan))));
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
109var firstStatementLocation = root.SyntaxTree.GetLocation(firstUnreachableStatement.FullSpan); 126var location = root.SyntaxTree.GetLocation(span);
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
77=> DiagnosticHelper.Create(descriptor, declaration.SyntaxTree.GetLocation(diagnosticSpan), severity, additionalLocations: null, properties: null);
CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
54additionalUnnecessaryLocations: ImmutableArray.Create(defaultExpression.SyntaxTree.GetLocation(fadeSpan))));
CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
61additionalUnnecessaryLocations: ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))); 86additionalUnnecessaryLocations: ImmutableArray.Create(context.Node.SyntaxTree.GetLocation(fadeSpan))));
Microsoft.CodeAnalysis.CSharp.Features (13)
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
51: declaration.SyntaxTree.GetLocation(TextSpan.FromBounds(declaration.SpanStart, declaration.SemicolonToken.Span.End));
ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
55: declaration.SyntaxTree.GetLocation(TextSpan.FromBounds(declaration.SpanStart, declaration.Name.Span.End));
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (3)
210syntaxTree.GetLocation(startReportSpan), 214syntaxTree.GetLocation(startReportSpan), 215syntaxTree.GetLocation(endReportSpan))));
CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
109var firstStatementLocation = root.SyntaxTree.GetLocation(firstUnreachableStatement.FullSpan); 126var location = root.SyntaxTree.GetLocation(span);
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
77=> DiagnosticHelper.Create(descriptor, declaration.SyntaxTree.GetLocation(diagnosticSpan), severity, additionalLocations: null, properties: null);
CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
54additionalUnnecessaryLocations: ImmutableArray.Create(defaultExpression.SyntaxTree.GetLocation(fadeSpan))));
CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
61additionalUnnecessaryLocations: ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))); 86additionalUnnecessaryLocations: ImmutableArray.Create(context.Node.SyntaxTree.GetLocation(fadeSpan))));
GenerateType\CSharpGenerateTypeService.cs (2)
589? semanticModel.SyntaxTree.GetLocation(new TextSpan(lastMember.Span.End, 0)) 590: semanticModel.SyntaxTree.GetLocation(new TextSpan());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
2059var spanLocation = tree.GetLocation(textSpan);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeFixes\CodeFixServiceTests.cs (1)
508c.ReportDiagnostic(Diagnostic.Create(descriptor, c.Tree.GetLocation(TextSpan.FromBounds(0, 0))));
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekHelpers.cs (1)
70return identifierLocation.SourceTree.GetLocation(node.Span).GetMappedLineSpan().Span;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
CodeDefinitionWindow\AbstractCodeDefinitionWindowTests.vb (1)
91Dim expectedSpan = (Await expectedDocument.GetSyntaxTreeAsync()).GetLocation(expectedHostDocument.SelectedSpans.Single()).GetLineSpan()
NavigationBar\TestHelpers.vb (1)
100Dim contextLocation = (Await document.GetSyntaxTreeAsync()).GetLocation(New TextSpan(0, 0))
Rename\RenameEngineResult.vb (2)
156Dim location = oldSyntaxTree.GetLocation(span) 204locations.Add(syntaxTree.GetLocation(span))
Microsoft.CodeAnalysis.Features (23)
AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
73Diagnostic.Create(Descriptor, context.Tree.GetLocation(
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
70node.SyntaxTree.GetLocation(GetFadeSpan(node)),
AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (2)
153yield return Diagnostic.Create(descriptor, tree.GetLocation(span)); 166yield return Diagnostic.Create(s_fixableIdDescriptor, tree.GetLocation(span));
AbstractSimplifyInterpolationHelpers.cs (1)
50.SelectAsArray(interpolation.Syntax.SyntaxTree.GetLocation);
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
149syntaxTree.GetLocation(TextSpan.FromBounds(match.SpanStart, arguments[0].SpanStart)), 150syntaxTree.GetLocation(TextSpan.FromBounds(arguments.Last().FullSpan.End, match.Span.End)));
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
146syntaxTree.GetLocation(TextSpan.FromBounds(match.Initializer.FullSpan.End, match.Statement.Span.End)))));
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
146contextLocation: semanticModel.SyntaxTree.GetLocation(TextSpan.FromBounds(line.Start, line.Start))),
EditAndContinue\RudeEditDiagnostic.cs (1)
42return Diagnostic.Create(descriptor, tree.GetLocation(Span), Arguments);
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
359contextLocation: fieldDeclaration.SyntaxTree.GetLocation(fieldDeclaration.Span)),
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (2)
89? syntaxTree.GetLocation(_state.TextSpan) 97contextLocation: syntaxTree.GetLocation(_state.TextSpan),
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.FieldDelegatingCodeAction.cs (2)
76? syntaxTree.GetLocation(_state.TextSpan) 83contextLocation: syntaxTree.GetLocation(_state.TextSpan),
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (2)
73? syntaxTree.GetLocation(_textSpan) 87contextLocation: syntaxTree.GetLocation(_textSpan)),
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
302new CodeGenerationContext(newSemanticModel.SyntaxTree.GetLocation(new TextSpan())), 401new CodeGenerationContext(afterThisLocation: _semanticDocument.SyntaxTree.GetLocation(_state.SimpleName.Span)),
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
46contextLocation: newSemanticModel.SyntaxTree.GetLocation(new TextSpan()),
Shared\Utilities\ExtractTypeHelpers.cs (1)
69contextLocation: newSemanticModel.SyntaxTree.GetLocation(new TextSpan()),
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
166var diagnostic = DiagnosticHelper.Create(descriptor, tree.GetLocation(issueSpan), severity, additionalLocations: null, builder.ToImmutable());
TaskList\AbstractTaskListService.cs (1)
114var location = document.SyntaxTree.GetLocation(new TextSpan(position, 0));
Microsoft.CodeAnalysis.VisualBasic (22)
Binding\Binder.vb (1)
660Return Me.SyntaxTree.GetLocation(span)
Binding\Binder_Utils.vb (1)
72Dim location = Me.SyntaxTree.GetLocation(New TextSpan(startLoc, endLoc - startLoc))
Compilation\VisualBasicCompilation.vb (4)
1711diagnostics.Add(ERRID.HDN_UnusedImportStatement, infoTree.GetLocation(info.StatementSpan)) 1733diagnostics.Add(ERRID.HDN_UnusedImportStatement, infoTree.GetLocation(info.StatementSpan)) 1736diagnostics.Add(ERRID.HDN_UnusedImportClause, infoTree.GetLocation(clauseSpan)) 2168Dim location = tree.GetLocation(TextSpan.FromBounds(0, 0))
Declarations\DeclarationTreeBuilder.vb (8)
345nameLocation:=_syntaxTree.GetLocation(dotted.Right.Span), 360nameLocation:=_syntaxTree.GetLocation(name.Span), 368nameLocation:=_syntaxTree.GetLocation(name.Span), 376nameLocation:=_syntaxTree.GetLocation(name.Span), 515nameLocation:=_syntaxTree.GetLocation(typeBlockSyntax.BlockStatement.Identifier.Span), 565nameLocation:=_syntaxTree.GetLocation(enumBlockSyntax.EnumStatement.Identifier.Span), 756nameLocation:=_syntaxTree.GetLocation(node.Identifier.Span), 782nameLocation:=_syntaxTree.GetLocation(node.Identifier.Span),
Symbols\Source\SourceFieldSymbol.vb (1)
849Return syntaxTree.GetLocation(GetFieldLocationFromSyntax(DirectCast(syntaxNode, ModifiedIdentifierSyntax).Identifier))
Symbols\Source\SourceMethodSymbol.vb (2)
180Dim location = binder.SyntaxTree.GetLocation(New TextSpan(startLoc, endLoc - startLoc)) 855Return syntaxTree.GetLocation(GetMethodLocationFromSyntax(syntaxNode))
Symbols\Source\SourcePropertySymbol.vb (1)
1136Return syntaxTree.GetLocation(block.BlockStatement.Span)
Symbols\Source\SourceTypeParameterSymbol.vb (1)
158Return syntaxTree.GetLocation(DirectCast(syntaxNode, TypeParameterSyntax).Identifier.Span)
Syntax\SyntaxTreeDiagnosticEnumerator.vb (1)
69Me._current = New VBDiagnostic(di, Me._tree.GetLocation(New TextSpan(position, node.Width)))
Syntax\VisualBasicSyntaxNode.vb (2)
287Return New VBDiagnostic(errorInfo, If(tree Is Nothing, New SourceLocation(tree, nodeOrToken.Span), tree.GetLocation(nodeOrToken.Span))) 294Return New VBDiagnostic(errorInfo, If(tree Is Nothing, New SourceLocation(tree, nodeOrToken.Span), tree.GetLocation(nodeOrToken.Span)))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (3)
59additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))) 79syntaxTree.GetLocation(fadeSpan), 82additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan))))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
54Dim contextLocation = syntaxTree.GetLocation(New TextSpan(0, 0))
Microsoft.CodeAnalysis.VisualBasic.Features (5)
GenerateType\VisualBasicGenerateTypeService.vb (2)
451semanticModel.SyntaxTree.GetLocation(New TextSpan()), 452semanticModel.SyntaxTree.GetLocation(New TextSpan(lastMember.Span.End, 0)))
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (3)
59additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan)))) 79syntaxTree.GetLocation(fadeSpan), 82additionalUnnecessaryLocations:=ImmutableArray.Create(syntaxTree.GetLocation(fadeSpan))))
Microsoft.CodeAnalysis.Workspaces (5)
Diagnostics\Extensions.cs (1)
61return tree.GetLocation(span);
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
204var location = state.SyntaxTree.GetLocation(new TextSpan(indexerReference.SpanStart, 0));
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
369reverseMappedLocations[tokenOrNode.GetLocation()!] = baseSyntaxTree.GetLocation(conflictAnnotation.OriginalSpan); 451reverseMappedLocations[tokenOrNode.GetLocation()!] = baseSyntaxTree.GetLocation(conflictAnnotation.OriginalSpan);
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
416var matchLocation = tree.GetLocation(matchTextSpan);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (1)
111c.ReportDiagnostic(Diagnostic.Create(descriptor, c.Tree.GetLocation(TextSpan.FromBounds(0, 0))));
Roslyn.VisualStudio.Next.UnitTests (2)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
295c.ReportDiagnostic(Diagnostic.Create(_supportedDiagnostics[0], c.Tree.GetLocation(TextSpan.FromBounds(0, 1)))); 313c.ReportDiagnostic(Diagnostic.Create(_supportedDiagnostics[0], c.Tree.GetLocation(TextSpan.FromBounds(0, 1))));