8 overrides of Span
Microsoft.CodeAnalysis (1)
Syntax\TranslationSyntaxReference.cs (1)
24public sealed override TextSpan Span
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SimpleSyntaxReference.cs (1)
30public override TextSpan Span
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
906public override TextSpan Span
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.NodeSyntaxReference.cs (1)
24public override TextSpan Span
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SimpleSyntaxReference.vb (1)
29Public Overrides ReadOnly Property Span As TextSpan
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
51Public Overrides ReadOnly Property Span As TextSpan
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
51Public Overrides ReadOnly Property Span As TextSpan
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.NodeSyntaxReference.vb (1)
24Public Overrides ReadOnly Property Span As TextSpan
79 references to Span
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.CodeAnalysis (6)
Compilation\Compilation.cs (1)
3580MarkImportDirectiveAsUsed(node.SyntaxTree, node.Span.Start);
Diagnostic\SourceLocation.cs (1)
49: this(syntaxRef.SyntaxTree, syntaxRef.Span)
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
2285if (!IsGeneratedOrHiddenCodeLocation(declaringRef.SyntaxTree, declaringRef.Span, cancellationToken)) 2521var isInGeneratedCode = isGeneratedCodeSymbol || IsGeneratedOrHiddenCodeLocation(decl.SyntaxTree, decl.Span, cancellationToken);
Syntax\SyntaxReference.cs (1)
52return this.SyntaxTree.GetLocation(this.Span);
Syntax\TranslationSyntaxReference.cs (1)
26get { return _reference.Span; }
Microsoft.CodeAnalysis.Analyzers (3)
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
153context.ReportDiagnostic(Diagnostic.Create(descriptor, Location.Create(applicationSyntaxReference.SyntaxTree, applicationSyntaxReference.Span)));
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
104Location.Create(applicationSyntaxReference.SyntaxTree, applicationSyntaxReference.Span),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
607r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.CodeAnalysis.CSharp (20)
Compilation\CSharpCompilation.cs (2)
4611return loc1.Span.Start - loc2.Span.Start;
Symbols\LexicalSortKey.cs (1)
68: this(syntaxRef.SyntaxTree, syntaxRef.Span.Start, compilation)
Symbols\Source\SourceMemberContainerSymbol.cs (15)
1046(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value))) 1128aggregateLength += syntaxRef.Span.Length; 1176int distanceFromInitializerStart = position - initializer.Syntax.Span.Start; 1196position < group.Last().Syntax.Span.End) 1258return initializer.Syntax.Span.Length; 1268int index = initializers.BinarySearch(position, (initializer, pos) => initializer.Syntax.Span.Start.CompareTo(pos)); 1279if (precedingInitializerIndex >= 0 && initializers[precedingInitializerIndex].Syntax.Span.Contains(position)) 3073(primaryConstructor.SyntaxRef.SyntaxTree != whereFoundField.SyntaxTree || primaryConstructor.SyntaxRef.Span != whereFoundField.Span)) 3356Debug.Assert(declaredMembers.DeclarationWithParameters.Span.Contains(InstanceInitializersForPositionalMembers[0].Syntax.Span.Start)); 3382declaredMembers.DeclarationWithParameters.Span.Contains(declaredMembers.InstanceInitializers[insertAt][0].Syntax.Span.Start)) 3390Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.Span.Start < declaredInitializers[0].Syntax.Span.Start); 3404declaredMembers.DeclarationWithParameters.Span.Contains(g[0].Syntax.Span.Start))); 4541Debug.Assert(node.SpanStart > initializers.Last().Syntax.Span.Start);
Symbols\Symbol.cs (1)
956(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value));
Symbols\SymbolDistinguisher.cs (1)
167var span = syntaxReferences[0].Span;
Microsoft.CodeAnalysis.CSharp.Features (3)
NavigationBar\CSharpNavigationBarItemService.cs (1)
265return GetSymbolLocation(solution, symbol, tree, static reference => reference.Span);
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
271var span = reference.Span;
QuickInfo\OnTheFlyDocsUtilities.cs (1)
24if (typeSyntaxReference is { Span: var typeSpan })
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
DeclarationTests.cs (1)
908get { return _underlyingSyntaxReference.Span; }
Symbols\SymbolEqualityTests.cs (2)
967Assert.Equal(lambdas[0].SyntaxRef.Span, lambdas[1].SyntaxRef.Span);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
537return parameterReference.Span.Start >= containingStaticFunction.SpanStart;
Simplification\Simplifiers\NameSimplifier.cs (1)
455return !name.Span.Contains(argumentDecl.Span);
Microsoft.CodeAnalysis.EditorFeatures (1)
Navigation\AbstractDefinitionLocationService.cs (1)
134if (symbol.DeclaringSyntaxReferences is not [{ SyntaxTree: { } definitionTree, Span: var definitionSpan }])
Microsoft.CodeAnalysis.Features (10)
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
330contextLocation: fieldDeclaration.SyntaxTree.GetLocation(fieldDeclaration.Span)));
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (3)
202({ SyntaxTree: var syntaxTree1, Span: var span1 }, { SyntaxTree: var syntaxTree2, Span: var span2 }) 258sourceSpans: [new DocumentSpan(destinationDocument, import.DeclaringSyntaxReference!.Span)],
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
133documentToTextSpans.Add(relatedDocument, reference.Span);
NavigationBar\AbstractNavigationBarItemService.cs (2)
68referencesInCurrentFile.First().Span; 80Location.Create(allReferences.First().SyntaxTree, allReferences.First().Span);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
607r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
ValueTracking\ValueTracker.cs (2)
42if (declaringSyntaxReferences.Any(static (r, selection) => r.Span.IntersectsWith(selection), selection)) 48var location = Location.Create(syntaxRef.SyntaxTree, syntaxRef.Span);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.CodeAnalysis.VisualBasic (10)
GlobalImport.vb (1)
118Dim startindex = unmappedSpan.Start - _clause.Span.Start
Symbols\LexicalSortKey.vb (3)
101Me.New(syntaxRef.SyntaxTree, syntaxRef.Span.Start, compilation) 201Return first.Span.Start - second.Span.Start
Symbols\Source\SourceMemberContainerTypeSymbol.vb (3)
3252aggregateLength += syntaxRef.Span.Length 3295Dim distanceFromInitializerStart = position - siblingInitializers(index).Syntax.Span.Start 3328If index >= 0 AndAlso initializers(index).Syntax.Span.Contains(position) Then
Symbols\Symbol.vb (1)
910(Not definedWithinSpan.HasValue OrElse syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)) Then
VisualBasicExtensions.vb (2)
227Return New EmbeddedTreeLocation(tree.GetEmbeddedKind, syntaxReference.Span) 229Return New MyTemplateLocation(tree, syntaxReference.Span)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
53Return _reference.Span
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
53Return _reference.Span
Microsoft.CodeAnalysis.Workspaces (2)
FindSymbols\SymbolFinder.cs (1)
216var linkedNode = linkedSyntaxRoot.FindNode(location.Span, getInnermostNodeForTie: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
184&& attr.ApplicationSyntaxReference.Span.Contains(locationInAttribute.SourceSpan)).ConstructorArguments[0].Value!;
Microsoft.Interop.SourceGeneration (6)
DiagnosticExtensions.cs (4)
36? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 50? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 140? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 154? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span)
TypePositionInfo.cs (2)
130outAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span); 135inAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span);
Roslyn.Diagnostics.Analyzers (3)
AbstractApplyTraitToClass`1.cs (2)
86.Single(attributeData => attributeData.ApplicationSyntaxReference is not null && attribute.Span.Contains(attributeData.ApplicationSyntaxReference.Span)); 106.Single(attributeData => attributeData.ApplicationSyntaxReference is not null && attribute.Span.Contains(attributeData.ApplicationSyntaxReference.Span));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
34return reference?.SyntaxTree.GetLocation(reference.Span);
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (1)
56var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan;