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
51 references to Span
Microsoft.CodeAnalysis (6)
Compilation\Compilation.cs (1)
3529MarkImportDirectiveAsUsed(node.SyntaxTree, node.Span.Start);
Diagnostic\SourceLocation.cs (1)
49: this(syntaxRef.SyntaxTree, syntaxRef.Span)
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
2287if (!IsGeneratedOrHiddenCodeLocation(declaringRef.SyntaxTree, declaringRef.Span, cancellationToken)) 2523var 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.CodeStyle (1)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
522r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
Microsoft.CodeAnalysis.CSharp (16)
Compilation\CSharpCompilation.cs (2)
4538return loc1.Span.Start - loc2.Span.Start;
Symbols\LexicalSortKey.cs (1)
68: this(syntaxRef.SyntaxTree, syntaxRef.Span.Start, compilation)
Symbols\Source\SourceMemberContainerSymbol.cs (11)
1025(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value))) 1107aggregateLength += syntaxRef.Span.Length; 1155int distanceFromInitializerStart = position - initializer.Syntax.Span.Start; 1175position < group.Last().Syntax.Span.End) 1237return initializer.Syntax.Span.Length; 1258if (precedingInitializerIndex >= 0 && initializers[precedingInitializerIndex].Syntax.Span.Contains(position)) 2779(primaryConstructor.SyntaxRef.SyntaxTree != whereFoundField.SyntaxTree || primaryConstructor.SyntaxRef.Span != whereFoundField.Span)) 3078declaredMembers.DeclarationWithParameters.Span.Contains(declaredMembers.InstanceInitializers[insertAt][0].Syntax.Span.Start)) 3086Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.Span.Start < declaredInitializers[0].Syntax.Span.Start); 3100declaredMembers.DeclarationWithParameters.Span.Contains(g[0].Syntax.Span.Start)));
Symbols\Symbol.cs (1)
955(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value));
Symbols\SymbolDistinguisher.cs (1)
169var span = syntaxReferences[0].Span;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
908get { return _underlyingSyntaxReference.Span; }
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\Simplifiers\NameSimplifier.cs (1)
455return !name.Span.Contains(argumentDecl.Span);
Microsoft.CodeAnalysis.Features (4)
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
329contextLocation: fieldDeclaration.SyntaxTree.GetLocation(fieldDeclaration.Span)));
NavigationBar\AbstractNavigationBarItemService.cs (1)
80Location.Create(allReferences.First().SyntaxTree, allReferences.First().Span);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
522r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
ValueTracking\ValueTracker.cs (1)
48var location = Location.Create(syntaxRef.SyntaxTree, syntaxRef.Span);
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)
3231aggregateLength += syntaxRef.Span.Length 3274Dim distanceFromInitializerStart = position - siblingInitializers(index).Syntax.Span.Start 3307If index >= 0 AndAlso initializers(index).Syntax.Span.Contains(position) Then
Symbols\Symbol.vb (1)
909(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)
279var linkedNode = linkedSyntaxRoot.FindNode(location.Span, getInnermostNodeForTie: true);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
55var 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);
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
34return reference?.SyntaxTree.GetLocation(reference.Span);