70 references to Span
Microsoft.CodeAnalysis (2)
Diagnostic\SourceLocation.cs (1)
37: this(nodeOrToken.SyntaxTree!, nodeOrToken.Span)
Syntax\SyntaxNodeOrToken.cs (1)
245/// Same as accessing <see cref="TextSpan.Start"/> on <see cref="Span"/>.
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (2)
62var innerSpan = TextSpan.FromBounds(startNode.Span.Start, endNode.Span.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
44Debug.Assert(ownerOfHeader.FullSpan.Contains(lastTokenOrNodeOfHeader.Span));
Microsoft.CodeAnalysis.CSharp (1)
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (1)
85=> nodeOrToken.AsNode(out var node) ? node.GetLastToken().Span.End : nodeOrToken.Span.End;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
53if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
58if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
63if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode && context.ShouldAnalyzeSpan(child.Span))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
168if (argument.Span.Start == location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.Features (9)
EditAndContinue\BreakpointSpans.cs (1)
156return nodeOrToken.Span.End;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1940=> TextSpan.FromBounds((modifiers.Count != 0) ? modifiers.First().SpanStart : start.SpanStart, end.Span.End);
InlineHints\CSharpInlineTypeHintsService.cs (2)
132return new TypeHint(type, span, new TextChange(displayAllSpan.Span, type.ToDisplayString(s_minimalTypeStyle)), trailingSpace: trailingSpace); 149return displayAllSpan.Span;
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
53if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
58if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
63if (!context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode && context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
168if (argument.Span.Start == location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
8808Assert.Equal(node1.Span, node2.Span);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
ParentChecker.cs (1)
20var span = nodeOrToken.Span;
Syntax\SyntaxAnnotationTests.cs (2)
361Assert.Equal(oldNode.Span, annotatedNode.Span);
Syntax\SyntaxNodeTests.cs (1)
1814Assert.Equal(namespaceNode.Span, nodeOrToken.Span);
Microsoft.CodeAnalysis.EditorFeatures (8)
CodeActions\CodeActionEditHandlerService.cs (1)
357this._threadingContext, editorWorkspace, documentId, resolvedRenameToken.Span, cancellationToken).ConfigureAwait(false))
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (7)
143if (node != null && activeSpan.Length == node.Value.Span.Length) 149return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 185return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 237return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 290return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 315while (node != null && (span.End.Position > node.Value.Span.End)) 345while (node.Parent != null && node.Parent.Span == node.Span)
Microsoft.CodeAnalysis.Features (5)
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
65if (element.IsToken && position >= element.Span.End)
Wrapping\AbstractCodeActionComputer.cs (2)
90new TextChange(TextSpan.FromBounds(nodeOrToken.Span.End, OriginalSourceText.Length), newLine)); 98var originalLineNumber = newSourceText.Lines.GetLineFromPosition(nodeOrToken.Span.End).LineNumber;
Wrapping\AbstractWrapper.cs (1)
49if (item == null || item.Span.IsEmpty || item.IsMissing)
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
342currentOffset += comma.Span.Length;
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
54Assert.Equal(default(TextSpan), d.Span); 71Assert.Equal(default(TextSpan), d.Span);
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\VisualBasicSyntaxNode.vb (2)
275Return New VBDiagnostic(errorInfo, If(tree Is Nothing, New SourceLocation(tree, nodeOrToken.Span), tree.GetLocation(nodeOrToken.Span)))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode And context.ShouldAnalyzeSpan(child.Span) Then
Microsoft.CodeAnalysis.VisualBasic.Features (2)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
1335endNode.Span.End)
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode And context.ShouldAnalyzeSpan(child.Span) Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\SyntaxAnnotationTests.vb (2)
335Assert.Equal(oldNode.Span, annotatedNode.Span)
TestSyntaxNodes.vb (3)
394Assert.Equal(New TextSpan(7, 1), argList.Arguments.GetWithSeparators(1).Span) 396Assert.Equal(New TextSpan(13, 1), argList.Arguments.GetWithSeparators(3).Span) 2188Assert.Equal(sN.Width, cS.Span.Length)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (12)
ParserTestUtilities.vb (12)
127Dim span = nodeOrToken.Span 661.AppendLine("Actual Errors (on " & node.Kind().ToString & node.Span.ToString & ")") 778Assert.False(node.IsMissing, "Unexpected missing node: " & node.Kind().ToString & node.Span.ToString) 784Not node.IsKind(SyntaxKind.ColonToken), "Unexpected missing token: " & node.Kind().ToString & node.Span.ToString) 800Assert.True(0 <> node.Span.Length, "Unexpected 0 width node: " & node.Kind().ToString & node.Span.ToString) 805Assert.True(0 <> node.Span.Length OrElse node.IsKind(SyntaxKind.EndOfFileToken) OrElse node.IsKind(SyntaxKind.StatementTerminatorToken) OrElse node.IsKind(SyntaxKind.ColonToken), "Unexpected 0 width token: " & node.Kind().ToString & node.Span.ToString) 807Assert.True(0 <> tr.Span.Length, "Unexpected 0 width trivia: " & node.Kind().ToString & node.Span.ToString) 813Assert.True(0 <> tr.Span.Length, "Unexpected 0 width trivia: " & node.Kind().ToString & node.Span.ToString) 858node.Span.End <= node.Parent.Span.End, "Span of child (" & 859node.Kind().ToString & node.Span.ToString &
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
79If result.Count > 0 AndAlso result.Last.Contains(nodeOrToken.Span) Then
Microsoft.CodeAnalysis.Workspaces (6)
CaseCorrection\CaseCorrector.cs (1)
49return await CaseCorrectAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span).ToImmutableArray(), cancellationToken).ConfigureAwait(false);
CodeCleanup\CodeCleaner.cs (1)
63return await CleanupAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span).ToImmutableArray(), options, providers, cancellationToken: cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
656var newReferencedSymbols = RenameUtilities.GetSymbolsTouchingPosition(tokenOrNode.Span.Start, newDocumentSemanticModel, newDocument.Project.Solution.Services, _cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (2)
62var innerSpan = TextSpan.FromBounds(startNode.Span.Start, endNode.Span.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
44Debug.Assert(ownerOfHeader.FullSpan.Contains(lastTokenOrNodeOfHeader.Span));