460 references to FullSpan
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (2)
96while (position <= token.SpanStart && root.FullSpan.Start < token.SpanStart); 119return position < root.FullSpan.End || !(root is ICompilationUnitSyntax)
Microsoft.CodeAnalysis (37)
DiagnosticAnalyzer\AnalysisScope.cs (2)
257if (ShouldInclude(node.FullSpan)) 279return ShouldInclude(node.FullSpan);
DiagnosticAnalyzer\AnalyzerDriver.cs (4)
1327var span = root.FullSpan; 2550bool isPartialDeclAnalysis = analysisScope.FilterSpanOpt.HasValue && !analysisScope.ContainsSpan(topmostNodeForAnalysis.FullSpan); 2652analyzer, semanticModel, _getKind, declarationAnalysisData.TopmostNodeForAnalysis.FullSpan, 2761analyzer, semanticModel, declarationAnalysisData.TopmostNodeForAnalysis.FullSpan,
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
791var diagReporter = GetAddSemanticDiagnostic(semanticModel.SyntaxTree, declaredNode.FullSpan, analyzer, cancellationToken); 1014diagReporter.FilterSpanForLocalDiagnostics = node.FullSpan; 1114diagReporter.FilterSpanForLocalDiagnostics = operation.Syntax.FullSpan; 1411if (diagnostic.Location.SourceSpan.IntersectsWith(syntax.FullSpan))
Syntax\ChildSyntaxList.cs (1)
224Debug.Assert(node.FullSpan.Contains(targetPosition));
Syntax\SyntaxDiffer.cs (1)
32_oldSpan = oldNode.FullSpan;
Syntax\SyntaxList`1.cs (2)
167return TextSpan.FromBounds(this[0].FullSpan.Start, this[this.Count - 1].FullSpan.End);
Syntax\SyntaxNode.cs (14)
529if (node == null || !this.FullSpan.Contains(node.FullSpan)) 758if (!FullSpan.Contains(position)) 875return DescendantNodesImpl(this.FullSpan, descendIntoChildren, descendIntoTrivia, includeSelf: false); 896return DescendantNodesImpl(this.FullSpan, descendIntoChildren, descendIntoTrivia, includeSelf: true); 917return DescendantNodesAndTokensImpl(this.FullSpan, descendIntoChildren, descendIntoTrivia, includeSelf: false); 938return DescendantNodesAndTokensImpl(this.FullSpan, descendIntoChildren, descendIntoTrivia, includeSelf: true); 953/// Finds the node with the smallest <see cref="FullSpan"/> that contains <paramref name="span"/>. 961/// <exception cref="ArgumentOutOfRangeException">This exception is thrown if <see cref="FullSpan"/> doesn't contain the given span.</exception> 964if (!this.FullSpan.Contains(span)) 971!.FirstAncestorOrSelf<SyntaxNode, TextSpan>((a, span) => a.FullSpan.Contains(span), span); 1102if (this.FullSpan.Contains(position)) 1183return DescendantTriviaImpl(this.FullSpan, descendIntoChildren, descendIntoTrivia); 1452if (!this.FullSpan.Contains(position))
Syntax\SyntaxNode.Iterators.cs (4)
90if (IsInSpan(in span, nodeValue.FullSpan)) 392if (includeSelf && IsInSpan(in span, this.FullSpan)) 417if (includeSelf && IsInSpan(in span, this.FullSpan)) 446if (includeSelf && IsInSpan(in span, this.FullSpan))
Syntax\SyntaxNodeOrToken.cs (2)
283return _nodeOrParent.FullSpan; 901if (!node.FullSpan.IntersectsWith(position))
Syntax\SyntaxNodeOrTokenList.cs (1)
167public TextSpan FullSpan => _node?.FullSpan ?? default(TextSpan);
Syntax\SyntaxTreeExtensions.cs (2)
35node = root.DescendantNodes(n => n.FullSpan.Contains(change)).LastOrDefault(); 44var span = node.FullSpan;
Microsoft.CodeAnalysis.CodeStyle (35)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
51if (root.FullSpan.IsEmpty)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
51var span = context.FilterSpan.HasValue ? context.FilterSpan.GetValueOrDefault() : root.FullSpan;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (4)
98.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan) 113.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan)); 221.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan) 222.Subtract(alignmentSyntax.FullSpan));
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
234if (!TryProceedWithInterval(addIfAvailable: false, context.CodeBlock.FullSpan, completed, intervalTree)) 241if (!TryProceedWithInterval(addIfAvailable: root == context.CodeBlock, context.CodeBlock.FullSpan, completed, intervalTree))
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
37syntaxTree.GetLocation(TextSpan.FromBounds(arguments.Last().FullSpan.End, match.Span.End))); 49syntaxTree.GetLocation(TextSpan.FromBounds(expression.FullSpan.End, match.Span.End)));
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (2)
35node = root.DescendantNodes(n => n.FullSpan.Contains(change)).LastOrDefault(); 44var span = node.FullSpan;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
117if (currentNode != null && searchSpan.Contains(currentNode.FullSpan) && predicate(currentNode)) 199=> node.FullSpan.Length; 399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 517nodesToReplace = retryAnnotations.GetAnnotatedNodes(root).ToDictionary(n => n.FullSpan); 604return (position < root.FullSpan.End || !(root is ICompilationUnitSyntax)) 638while (token.RawKind != 0 && token.Span.End <= position && token.Span.End <= root.FullSpan.End); 672while (position <= token.SpanStart && root.FullSpan.Start < token.SpanStart); 962var fullSpan = node.FullSpan;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
160if (position == root.FullSpan.End)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
38spansToFormat = node.FullSpan.IsEmpty ? [] : [node.FullSpan];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
366if (root.FullSpan.End == position && operation.TextSpan.End == position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
84var data = new SimpleIndentationData(rootNode.FullSpan, indentation: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
114textSpan: _rootNode.FullSpan,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.cs (2)
61get { return this.Root.FullSpan.Start; } 66get { return this.Root.FullSpan.End; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (2)
156(node.FullSpan.Start == 0 && _fileBannerMatcher.TryMatch(leadingTriviaToKeep, ref index))) 168Debug.Assert(root.FullSpan.Start == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
44Debug.Assert(ownerOfHeader.FullSpan.Contains(lastTokenOrNodeOfHeader.Span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (5)
104var endToken = (root.FullSpan.End <= textSpan.End) ? 143return root.FullSpan.End == startToken.SpanStart || startToken.FullSpan.End > endToken.FullSpan.Start; 286Contract.ThrowIfFalse(backwardPosition < parentNode.FullSpan.End); 312Contract.ThrowIfFalse(parentNode.FullSpan.Start < forwardPosition); 325var fullSpan = node.FullSpan;
Microsoft.CodeAnalysis.CodeStyle.Fixes (11)
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
83var updatedRoot = SyntaxFormatting.GetFormattingResult(editor.OriginalRoot, [editor.OriginalRoot.FullSpan], formattingOptions, rules: default, cancellationToken).GetFormattedRoot(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (5)
261[currentRoot.FullSpan], 506positionOfRemovedNode = attributeList.FullSpan.Start; 526positionOfRemovedNode = attributeToRemove.FullSpan.Start; 528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (2)
66if (!node.FullSpan.OverlapsWith(selection)) 75if (node.FullSpan.Contains(selection.Start))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
66bool OverlapsWithSpan(SyntaxNode n) => spansTree.HasIntervalThatOverlapsWith(n.FullSpan.Start, n.FullSpan.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
139var node = token.Parent!.AncestorsAndSelf().First(a => a.FullSpan.Contains(span));
Microsoft.CodeAnalysis.CSharp (25)
Compilation\CSharpCompilation.cs (1)
3094bool reportUnusedUsings = (!span.HasValue || span.Value == tree.GetRoot(cancellationToken).FullSpan) && ReportUnusedImportsInTree(tree);
Compilation\CSharpSemanticModel.cs (4)
1275int fullEnd = this.Root.FullSpan.End; 1276bool atEOF = position == fullEnd && position == this.SyntaxTree.GetRoot().FullSpan.End; 1303string.Format(CSharpResources.PositionIsNotWithinSyntax, Root.FullSpan)); 1314var fullSpan = this.Root.FullSpan;
Compilation\MemberSemanticModel.cs (4)
1580if (!this.Root.FullSpan.Contains(position)) 1840var span = expr.Syntax.FullSpan; 1859if (value.Syntax.FullSpan.Contains(position)) 1864if (expr.Syntax.FullSpan.Contains(position))
Compilation\SyntaxTreeSemanticModel.cs (2)
108if (span.HasValue && !this.Root.FullSpan.Contains(span.Value)) 1047if (node != null && node.FullSpan.Contains(span))
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
47if (IsSyntacticallyFilteredOut(node.FullSpan))
Symbols\Source\SourceNamespaceSymbol.cs (1)
480if (syntax.FullSpan.IntersectsWith(definedWithinSpan.Value))
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
85get { return _root.FullSpan.Length; }
Syntax\SyntaxNodeRemover.cs (6)
69var span0 = nodes[0].FullSpan; 75var span = nodes[i].FullSpan; 161return node.FullSpan.IntersectsWith(_searchSpan) || (_residualTrivia != null && _residualTrivia.Count > 0); 306this.AddDirectives(node, GetRemovedSpan(node.Span, node.FullSpan)); 345var fullSpan = TextSpan.FromBounds(token.FullSpan.Start, node.FullSpan.End); 379var fullSpan = TextSpan.FromBounds(node.FullSpan.Start, token.FullSpan.End);
Syntax\SyntaxNormalizer.cs (1)
48var normalizer = new SyntaxNormalizer(node.FullSpan, GetDeclarationDepth(node), indentWhitespace, eolWhitespace, useElasticTrivia);
Syntax\SyntaxReplacer.cs (3)
98_nodeSet.Select(n => n.FullSpan).Concat( 186if (this.ShouldVisit(node.FullSpan)) 334if (this.ShouldVisit(node.FullSpan))
Syntax\SyntaxTreeDiagnosticEnumerator.cs (1)
62var length = _syntaxTree.GetRoot().FullSpan.Length;
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
72TextSpan.FromBounds(start, root.Members.OfType<GlobalStatementSyntax>().Last().FullSpan.End));
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
284if (!syntaxTreeState.TryProceedWithInterval(context.CodeBlock.FullSpan)) 290syntaxTreeState.TryReportNullableImpactingSpans(context.CodeBlock.FullSpan, nullableImpactingSpans);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (3)
117var firstStatementLocation = root.SyntaxTree.GetLocation(firstUnreachableStatement.FullSpan); 134var span = TextSpan.FromBounds(section[0].FullSpan.Start, section.Last().FullSpan.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
37directive.FullSpan.End == syntaxTree.GetRoot(cancellationToken).FullSpan.End;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (3)
103return TextSpan.FromBounds(_node.FullSpan.Start, pair.Item2.SpanStart); 108return TextSpan.FromBounds(pair.Item1.Span.End, _node.FullSpan.End); 155if (node == null || !_spans.HasIntervalThatIntersectsWith(node.FullSpan))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
713var end = root.FullSpan.End; 1132return !branch.IsActive || !branch.BranchTaken ? TextSpan.FromBounds(branch.FullSpan.Start, position) : default;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
133if (!localFunction.FullSpan.Contains(referenceSpan))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.cs (3)
3761filterSpan: localDecl1.FullSpan, 4132if (!_topmostNode.FullSpan.Contains(context.Node.FullSpan))
Diagnostics\GetDiagnosticsTests.cs (4)
173model.GetDiagnostics(tree1.GetRoot().FullSpan); 222model.GetDiagnostics(tree1.GetRoot().FullSpan); 274model.GetDiagnostics(tree1.GetRoot().FullSpan); 324model.GetDiagnostics(tree.GetRoot().FullSpan);
Semantics\OutVarTests.cs (1)
1079if (typeofExpression?.Type?.FullSpan.Contains(decl.Span) == true)
Microsoft.CodeAnalysis.CSharp.Features (33)
ChangeSignature\CSharpChangeSignatureService.cs (1)
232return position <= parameterList.FullSpan.End;
Debugging\BreakpointResolver.cs (2)
51var lengthOfParsedText = name.FullSpan.End; 64lengthOfParsedText += parameterList.FullSpan.End;
Debugging\LocationInfoGetter.cs (1)
46if (declarator.FullSpan.Contains(position))
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (12)
144if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false) 161if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false) 178if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false) 195if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false) 233if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false) 250if (_ignoredSpans?.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) ?? false)
EditAndContinue\BreakpointSpans.cs (5)
300=> CreateSpan((position <= switchArm.WhenClause?.FullSpan.End == true) ? switchArm.WhenClause : switchArm.Expression); 308switchArm = switchExpression.Arms.LastOrDefault(arm => position >= arm.FullSpan.Start) ?? switchExpression.Arms.First(); 346if (property.Initializer != null && position >= property.Initializer.FullSpan.Start) 684else if (position < forEachStatement.Expression.FullSpan.Start) 978if (position <= accessors[i].FullSpan.End || i == accessors.Count - 1)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
214if (!body.FullSpan.Contains(position))
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
146: TextSpan.FromBounds(explicitName.FullSpan.Start, identifier.FullSpan.End);
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (2)
161var state = GetCurrentArgumentState(root, position, syntaxFacts, targetExpression.FullSpan, cancellationToken); 232expr.FullSpan.Contains(token.SpanStart) &&
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
72TextSpan.FromBounds(start, root.Members.OfType<GlobalStatementSyntax>().Last().FullSpan.End));
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
284if (!syntaxTreeState.TryProceedWithInterval(context.CodeBlock.FullSpan)) 290syntaxTreeState.TryReportNullableImpactingSpans(context.CodeBlock.FullSpan, nullableImpactingSpans);
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (3)
117var firstStatementLocation = root.SyntaxTree.GetLocation(firstUnreachableStatement.FullSpan); 134var span = TextSpan.FromBounds(section[0].FullSpan.Start, section.Last().FullSpan.End);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
133if (!localFunction.FullSpan.Contains(referenceSpan))
Structure\Providers\DocumentationCommentStructureProvider.cs (1)
31var startPos = documentationComment.FullSpan.Start;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\SyntaxUtilitiesTests.cs (1)
24foreach (var oldNode in oldRoot.DescendantNodes().Where(n => n.FullSpan.Length > 0))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\AccessibilityTests.cs (1)
53s_testModel.IsAccessible(s_testModel.SyntaxTree.GetCompilationUnitRoot().FullSpan.End + 1, s_testSymbol));
Semantics\InitOnlyMemberTests.cs (2)
3159speculativeModel.GetSpeculativeSymbolInfo(p.FullSpan.Start, p, SpeculativeBindingOption.BindAsExpression); 3164speculativeModel.GetSpeculativeTypeInfo(p.FullSpan.Start, p, SpeculativeBindingOption.BindAsExpression);
Semantics\LookupTests.cs (1)
1369var eof = tree.GetCompilationUnitRoot().FullSpan.End;
Semantics\SuppressAccessibilityChecksTests.cs (7)
55var position = invocation.FullSpan.Start; 73var position = invocation.FullSpan.Start; 88var position = invocation.FullSpan.Start; 125var symbolInfo = model.GetSpeculativeSymbolInfo(expr.FullSpan.Start, 175var position = invocation.FullSpan.Start; 234speculativeModel.GetSpeculativeSymbolInfo(p.FullSpan.Start, p, SpeculativeBindingOption.BindAsExpression); 239speculativeModel.GetSpeculativeTypeInfo(p.FullSpan.Start, p, SpeculativeBindingOption.BindAsExpression);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\UsedAssembliesTests.cs (2)
145var beforeUsings = source.Substring(0, unit.Usings.First().FullSpan.Start); 146var afterUsings = source.Substring(unit.Usings.Last().FullSpan.End);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (33)
Diagnostics\LocationsTests.cs (2)
561var treeSpan = tree.GetRoot().FullSpan; 589var treeSpan = tree.GetRoot().FullSpan;
Syntax\StructuredTriviaTests.cs (1)
93var resultList = identExpr.DescendantTokens(t => t.FullSpan.OverlapsWith(new TextSpan(3, 18)));
Syntax\SyntaxAnnotationTests.cs (2)
623Assert.Equal(oldNode.FullSpan, annotatedNode.FullSpan);
Syntax\SyntaxDiffingTests.cs (1)
28Assert.Equal(newTree.GetCompilationUnitRoot().FullSpan, spans[0]);
Syntax\SyntaxNodeTests.cs (27)
155nodes = statement.DescendantNodes(statement.FullSpan).ToList(); 159nodes = statement.DescendantNodes(statement.FullSpan, descendIntoTrivia: true).ToList(); 165nodes = statement.DescendantNodes(statement.FullSpan, n => n is StatementSyntax).ToList(); 169nodes = statement.DescendantNodes(statement.FullSpan, n => n is StatementSyntax, descendIntoTrivia: true).ToList(); 205nodes = statement.DescendantNodesAndSelf(statement.FullSpan).ToList(); 210nodes = statement.DescendantNodesAndSelf(statement.FullSpan, descendIntoTrivia: true).ToList(); 217nodes = statement.DescendantNodesAndSelf(statement.FullSpan, n => n is StatementSyntax).ToList(); 222nodes = statement.DescendantNodesAndSelf(statement.FullSpan, n => n is StatementSyntax, descendIntoTrivia: true).ToList(); 256nodesAndTokens = statement.DescendantNodesAndTokens(statement.FullSpan).ToList(); 293nodesAndTokens = statement.DescendantNodesAndTokensAndSelf(statement.FullSpan).ToList(); 714for (int i = 0; i < node.FullSpan.End; i++) 745var EOFSpan = new TextSpan(root.FullSpan.End, 0); 754var nodeEndPositionSpan = new TextSpan(classDecl.FullSpan.End, 0); 766invalidSpan = new TextSpan(root.FullSpan.End - 1, 2); 768invalidSpan = new TextSpan(classDecl2.FullSpan.Start - 1, root.FullSpan.End); 770invalidSpan = new TextSpan(classDecl.FullSpan.End, root.FullSpan.End); 773Assert.Throws<ArgumentOutOfRangeException>(() => classDecl.FindNode(root.FullSpan)); 1780Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length); 1798Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length); 1813Assert.Equal(namespaceNode.FullSpan, nodeOrToken.FullSpan); 2055var actualTokens = syntaxTree.GetRoot().DescendantTokens(syntaxTree.GetRoot().FullSpan); 3586Assert.InRange(0, root.FullSpan.Start, root.FullSpan.End); 3591Assert.NotInRange(0, method.FullSpan.Start, method.FullSpan.End);
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\Worker_DocumentationComments.cs (1)
23var childFullSpan = xmlNode.FullSpan;
OrganizeImports\CSharpOrganizeImportsService.Rewriter.cs (2)
81=> TextSpan.FromBounds(list.First().FullSpan.Start, list.Last().FullSpan.End);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
37directive.FullSpan.End == syntaxTree.GetRoot(cancellationToken).FullSpan.End;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (3)
103return TextSpan.FromBounds(_node.FullSpan.Start, pair.Item2.SpanStart); 108return TextSpan.FromBounds(pair.Item1.Span.End, _node.FullSpan.End); 155if (node == null || !_spans.HasIntervalThatIntersectsWith(node.FullSpan))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
450var interceptsLocationData = new InterceptsLocationData(contentHash, simpleName.FullSpan.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
713var end = root.FullSpan.End; 1132return !branch.IsActive || !branch.BranchTaken ? TextSpan.FromBounds(branch.FullSpan.Start, position) : default;
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
62=> _root.FullSpan.Length;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Completion\AbstractArgumentProviderTests`1.cs (2)
106? arguments.IndexOf(arguments.Single(argument => argument.FullSpan.Start <= position && argument.FullSpan.End >= position))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
67var span = (await document.GetSyntaxRootAsync()).FullSpan;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
60Return Await GetDiagnosticsForSpanAsync(diagnosticService, document, range:=(Await document.GetSyntaxRootAsync()).FullSpan)
Microsoft.CodeAnalysis.Features (14)
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
72if (declarationSyntax != null && position < declarationSyntax.FullSpan.End)
EditAndContinue\ActiveStatementsMap.cs (1)
201oldRoot.FullSpan.Contains(unmappedSpan.Start) &&
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
232var moveSpan = new TextSpan(container.FullSpan.Start, 0);
NavigationBar\AbstractNavigationBarItemService.cs (1)
93return GetSymbolLocation(solution, symbol, tree, r => r.GetSyntax().FullSpan, symbolDeclarationService.GetDeclarations(symbol));
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
51if (root.FullSpan.IsEmpty)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
51var span = context.FilterSpan.HasValue ? context.FilterSpan.GetValueOrDefault() : root.FullSpan;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (4)
98.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan) 113.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan)); 221.Subtract(GetPreservedInterpolationExpressionSyntax(instance).FullSpan) 222.Subtract(alignmentSyntax.FullSpan));
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
234if (!TryProceedWithInterval(addIfAvailable: false, context.CodeBlock.FullSpan, completed, intervalTree)) 241if (!TryProceedWithInterval(addIfAvailable: root == context.CodeBlock, context.CodeBlock.FullSpan, completed, intervalTree))
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (1)
49syntaxTree.GetLocation(TextSpan.FromBounds(expression.FullSpan.End, match.Span.End)));
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
83var updatedRoot = SyntaxFormatting.GetFormattingResult(editor.OriginalRoot, [editor.OriginalRoot.FullSpan], formattingOptions, rules: default, cancellationToken).GetFormattedRoot(cancellationToken);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Diagnostics\TestDiagnosticAnalyzerDriver.cs (1)
88var span = (await document.GetSyntaxRootAsync()).FullSpan;
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (3)
251Debug.Assert(executor.AnalysisScope.Span.Value == changedMember.FullSpan); 322Contract.ThrowIfFalse(member.FullSpan.Start == oldSpan.Start); 323var delta = member.FullSpan.End - oldSpan.End;
Microsoft.CodeAnalysis.Test.Utilities (1)
CommonTestBase.cs (1)
690Assert.True(semanticModel.Root.FullSpan.Contains(child.Syntax.FullSpan));
Microsoft.CodeAnalysis.VisualBasic (23)
Compilation\DocumentationComments\UnprocessedDocumentationCommentFinder.vb (3)
73If IsSyntacticallyFilteredOut(node.FullSpan) Then 93If IsSyntacticallyFilteredOut(node.FullSpan) Then 107If node.HasStructuredTrivia AndAlso Not IsSyntacticallyFilteredOut(node.FullSpan) Then
Compilation\SemanticModel.vb (2)
570Dim atEOF As Boolean = (position = fullEnd AndAlso position = SyntaxTree.GetRoot().FullSpan.End) 614Dim atEOF As Boolean = (position = fullEnd AndAlso position = SyntaxTree.GetRoot().FullSpan.End)
Compilation\VisualBasicCompilation.vb (1)
2316If Not filterSpanWithinTree.HasValue OrElse filterSpanWithinTree.Value = tree.GetRoot(cancellationToken).FullSpan Then
Scanner\Blender.vb (3)
113If Not node.FullSpan.Contains(position) Then 114Debug.Assert(node.FullSpan.End = position) 122Return node.FullSpan
Symbols\Symbol.vb (1)
921(Not definedWithinSpan.HasValue OrElse definedWithinSpan.Value.IntersectsWith(syntaxNode.FullSpan))
Syntax\SyntaxFacts.vb (1)
205ElseIf position >= span.End AndAlso position < node.FullSpan.End Then
Syntax\SyntaxNodeRemover.vb (6)
48Dim span0 = nodes(0).FullSpan 54Dim span = nodes(i).FullSpan 99Return node.FullSpan.IntersectsWith(Me._searchSpan) OrElse (Me._residualTrivia IsNot Nothing AndAlso Me._residualTrivia.Count > 0) 214Me.AddDirectives(node, GetRemovedSpan(node.Span, node.FullSpan)) 239Dim fullSpan = TextSpan.FromBounds(token.FullSpan.Start, node.FullSpan.End) 263Dim fullSpan = TextSpan.FromBounds(node.FullSpan.Start, token.FullSpan.End)
Syntax\SyntaxNormalizer.vb (1)
57Dim normalizer As New SyntaxNormalizer(node.FullSpan, indentWhitespace, eolWhitespace, useElasticTrivia, useDefaultCasing)
Syntax\SyntaxReplacer.vb (4)
83Me._spanSet = New HashSet(Of TextSpan)(Me._nodeSet.Select(Function(n) n.FullSpan).Concat( 148If Me.ShouldVisit(node.FullSpan) Then 262If node IsNot Nothing AndAlso ShouldVisit(node.FullSpan) Then 292MyBase.New(originalNode.FullSpan, editKind, visitTrivia:=False, visitIntoStructuredTrivia:=originalNode.IsPartOfStructuredTrivia())
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
97Return _root.FullSpan.Length
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (4)
53If current.FullSpan.End <> token.FullSpan.End Then 352Return directive.FullSpan.Contains(position) OrElse 353directive.FullSpan.End = syntaxTree.GetRoot(cancellationToken).FullSpan.End
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
137position = oldMethod.BlockStatement.FullSpan.End
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (3)
750Dim [end] = root.FullSpan.End 833firstStatement.FullSpan.Start, 834method.EndBlockStatement.FullSpan.Start)
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.TriviaRewriter.vb (3)
86Return TextSpan.FromBounds(_node.FullSpan.Start, pair.Item2.SpanStart) 90Return TextSpan.FromBounds(pair.Item1.Span.End, _node.FullSpan.End) 122If node Is Nothing OrElse Not Me._spans.HasIntervalThatIntersectsWith(node.FullSpan) Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (3)
384Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newMember, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode)) 394Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newCompilationUnit, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode)) 403Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newParameter, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
550position = possibleTuple.FullSpan.Start
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
238Return GetImplicitMemberAccessExpressions(expression, expression.FullSpan)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
72TextSpan.FromBounds(startToken.FullSpan.Start, node.FullSpan.End), indentationDelta:=1, [option]:=IndentBlockOption.RelativePosition))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (1)
49Return New ReplaceSpanResult(node.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot), ifNodeToken.ToFullString(), position)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (2)
69Return New ReplaceSpanResult(originalNode.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot), 97Return New ReplaceSpanResult(originalNode.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot),
LineCommit\CommitFormatter.vb (1)
240Dim token = syntaxTree.GetRoot(cancellationToken).FindToken(Math.Min(endPosition, syntaxTree.GetRoot(cancellationToken).FullSpan.End))
Microsoft.CodeAnalysis.VisualBasic.Features (12)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
251Dim insertionPoint = GetBeginStatement(endStatement.Parent).FullSpan.End
Debugging\BreakpointResolver.vb (2)
55Dim lengthOfParsedText = name.FullSpan.End 64lengthOfParsedText += parameterList.FullSpan.End
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (8)
122If _ignoredSpans IsNot Nothing AndAlso _ignoredSpans.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) Then 134If _ignoredSpans IsNot Nothing AndAlso _ignoredSpans.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) Then 146If _ignoredSpans IsNot Nothing AndAlso _ignoredSpans.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) Then 178If _ignoredSpans IsNot Nothing AndAlso _ignoredSpans.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
138If Not body.FullSpan.Contains(position) Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (39)
Syntax\SyntaxAnnotationTests.vb (2)
565Assert.Equal(oldNode.FullSpan, annotatedNode.FullSpan)
Syntax\SyntaxFactsTest.vb (1)
1021Dim builder As New System.Text.StringBuilder(cu.FullSpan.Length * 2)
TestSyntaxNodes.vb (36)
222Assert.Equal(expectedFullSpan.Start, list(0).FullSpan.Start) 223Assert.Equal(expectedFullSpan.End, list(list.Count - 1).FullSpan.End) 228Assert.Equal(list(i - 1).FullSpan.End, list(i).FullSpan.Start) 231Assert.Equal(list(i).FullSpan.End, list(i + 1).FullSpan.Start) 324Assert.True(tree.FullSpan.Contains(tree.Span)) 328Assert.Equal(tree.Span, tree.FullSpan) 334Assert.Equal(tree.SpanStart, tree.FullSpan.Start) 336VerifyListSpans(precedingTrivia, New TextSpan(tree.FullSpan.Start, (tree.SpanStart - tree.FullSpan.Start))) 340Assert.Equal(tree.Span.End, tree.FullSpan.End) 342VerifyListSpans(followingTrivia, New TextSpan(tree.Span.End, (tree.FullSpan.End - tree.Span.End))) 347VerifyListSpans(tree.ChildNodesAndTokens(), tree.FullSpan) 376Assert.Equal(New TextSpan(0, 1), dig1.FullSpan) 385Assert.Equal(New TextSpan(3, 1), binop.Right.FullSpan) 389Assert.Equal(New TextSpan(0, 18), simpleTree.FullSpan) 595Assert.Equal(start, seplist(0).FullSpan.Start) 597Assert.Equal(start + 4, seplist(0).FullSpan.End) 817Assert.Equal(8, endTry.FullSpan.Length) 1736Assert.Equal(0, tree.GetRoot().FindToken(node.FullSpan.Length - 1).TrailingTrivia.Count) 1896Dim terminals = tree.DescendantTokens(tree.FullSpan) 1906terminals = tree.DescendantTokens(tree.FullSpan) 2273Dim EOFSpan = New TextSpan(root.FullSpan.End, 0) 2283Dim nodeEndPositionSpan = New TextSpan(classDecl.FullSpan.End, 0) 2296invalidSpan = New TextSpan(root.FullSpan.End - 1, 2) 2298invalidSpan = New TextSpan(classDecl2.FullSpan.Start - 1, root.FullSpan.End) 2300invalidSpan = New TextSpan(classDecl.FullSpan.End, root.FullSpan.End) 2303Assert.Throws(Of ArgumentOutOfRangeException)(Sub() classDecl.FindNode(root.FullSpan)) 2335For i As Integer = 1 To node.FullSpan.End - 1 2424nodes = statement.DescendantNodes(statement.FullSpan).ToList() 2428nodes = statement.DescendantNodes(statement.FullSpan, descendIntoTrivia:=True).ToList() 2459nodes = statement.DescendantNodesAndSelf(statement.FullSpan).ToList() 2464nodes = statement.DescendantNodesAndSelf(statement.FullSpan, descendIntoTrivia:=True).ToList()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (31)
Classification\Worker.DocumentationCommentClassifier.vb (1)
24Dim childFullSpan = xmlNode.FullSpan
Classification\Worker.vb (1)
183If Not _textSpan.OverlapsWith(directiveSyntax.FullSpan) Then
Classification\Worker.XmlClassifier.vb (1)
28If Not _worker._textSpan.OverlapsWith(node.FullSpan) Then
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (2)
57_spans.GetIntervalsThatOverlapWith(node.FullSpan.Start, node.FullSpan.Length).Any()
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (2)
93Not _spans.HasIntervalThatOverlapsWith(node.FullSpan.Start, node.FullSpan.Length) Then
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
68result.Add(parentMultiLineNode.FullSpan)
Formatting\Engine\Trivia\TriviaDataFactory.TriviaRewriter.vb (3)
86Return TextSpan.FromBounds(_node.FullSpan.Start, pair.Item2.SpanStart) 90Return TextSpan.FromBounds(pair.Item1.Span.End, _node.FullSpan.End) 122If node Is Nothing OrElse Not Me._spans.HasIntervalThatIntersectsWith(node.FullSpan) Then
OrganizeImports\VisualBasicOrganizeImportsService.Rewriter.vb (4)
75Return TextSpan.FromBounds(list.First().FullSpan.Start, list.Last().FullSpan.[End]) 79Return TextSpan.FromBounds(list.First().FullSpan.Start, list.Last().FullSpan.[End])
SemanticModelReuse\VisualBasicSemanticModelReuseLanguageService.vb (1)
65If previousSemanticModel.TryGetSpeculativeSemanticModelForMethodBody(previousMethodBlockBaseNode.BlockStatement.FullSpan.End, DirectCast(currentBodyNode, MethodBlockBaseSyntax), speculativeModel) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (4)
53If current.FullSpan.End <> token.FullSpan.End Then 352Return directive.FullSpan.Contains(position) OrElse 353directive.FullSpan.End = syntaxTree.GetRoot(cancellationToken).FullSpan.End
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
137position = oldMethod.BlockStatement.FullSpan.End
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (3)
750Dim [end] = root.FullSpan.End 833firstStatement.FullSpan.Start, 834method.EndBlockStatement.FullSpan.Start)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (3)
384Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newMember, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode)) 394Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newCompilationUnit, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode)) 403Return Cast(Of TDeclarationNode)(AppendTriviaAtPosition(newParameter, positionOfRemovedNode - destination.FullSpan.Start, triviaOfRemovedNode))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (1)
550position = possibleTuple.FullSpan.Start
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
238Return GetImplicitMemberAccessExpressions(expression, expression.FullSpan)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
72TextSpan.FromBounds(startToken.FullSpan.Start, node.FullSpan.End), indentationDelta:=1, [option]:=IndentBlockOption.RelativePosition))
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.ParsedSyntaxTree.vb (1)
57Return _root.FullSpan.Length
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (3)
Formatting\VisualBasicFormattingTestBase.vb (3)
65spans.Add(syntaxTree.GetRoot().FullSpan) 70changes = Formatter.GetFormattedTextChanges(Await syntaxTree.GetRootAsync(), (Await syntaxTree.GetRootAsync()).FullSpan, workspace.Services.SolutionServices, options, CancellationToken.None) 74spans.Add(syntaxTree.GetRoot().FullSpan)
Microsoft.CodeAnalysis.Workspaces (72)
CaseCorrection\CaseCorrector.cs (1)
34return await CaseCorrectAsync(document, root.FullSpan, cancellationToken).ConfigureAwait(false);
Classification\SyntaxClassification\SyntacticChangeRangeComputer.cs (8)
161return newRoot.FullSpan.Length; 165return oldRoot.FullSpan.Length; 190Contract.ThrowIfFalse((oldRoot.FullSpan.End - currentOld.FullSpan.End) == 191(newRoot.FullSpan.End - currentNew.FullSpan.End)); 211return oldRoot.FullSpan.End - currentOld.FullSpan.End; 216return oldRoot.FullSpan.End - currentOld.FullSpan.End; 229return newRoot.FullSpan.Length; 233return oldRoot.FullSpan.Length;
CodeCleanup\AbstractCodeCleanerService.cs (6)
45if (CleanupWholeNode(root.FullSpan, normalizedSpan)) 48return await IterateAllCodeCleanupProvidersAsync(document, document, options, r => [r.FullSpan], codeCleaners, cancellationToken).ConfigureAwait(false); 58return await IterateAllCodeCleanupProvidersAsync(document, document, options, n => [n.FullSpan], codeCleaners, cancellationToken).ConfigureAwait(false); 87if (CleanupWholeNode(root.FullSpan, normalizedSpan)) 90return await IterateAllCodeCleanupProvidersAsync(root, root, options, r => [r.FullSpan], services, codeCleaners, cancellationToken).ConfigureAwait(false); 100return await IterateAllCodeCleanupProvidersAsync(root, root, options, n => [n.FullSpan], services, codeCleaners, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
60var spans = fixAllSpans.HasValue ? fixAllSpans.Value : [editor.OriginalRoot.FullSpan];
Editing\ImportAdder.cs (1)
22return [root.FullSpan];
Editing\SymbolEditor.cs (3)
377return doc != null && doc.Id == documentId && d.FullSpan.IntersectsWith(position); 411var declaration = this.GetDeclarations(currentSymbol).FirstOrDefault(d => memberDecls.Any(md => md.SyntaxTree == d.SyntaxTree && d.FullSpan.IntersectsWith(md.FullSpan)));
FindSymbols\SymbolFinder.cs (2)
217if (originalRoot.FullSpan != linkedSyntaxRoot.FullSpan)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
303interceptsLocationInfo[interceptsLocationData] = node.FullSpan;
FindSymbols\TopLevelSyntaxTree\DeclaredSymbolInfo.cs (3)
224if (root.FullSpan.Contains(this.Span)) 234{nameof(root.FullSpan)} = {root.FullSpan}";
Formatting\Formatter.cs (5)
189=> Format(node, [node.FullSpan], workspace, options, rules: default, cancellationToken); 192=> Format(node, [node.FullSpan], services, options, rules: default, cancellationToken); 249spans ??= [node.FullSpan]; 269=> GetFormattedTextChanges(node, [node.FullSpan], workspace, options, rules: default, cancellationToken: cancellationToken); 272=> GetFormattedTextChanges(node, [node.FullSpan], services, options, rules: default, cancellationToken: cancellationToken);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (3)
40return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]); 55var partialDeclSpan = syntaxFacts.GetContainingTypeDeclaration(root, syntaxRef.Span.Start)?.FullSpan; 66return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]);
Simplification\Simplifier.cs (3)
161return await ReduceAsync(document, root.FullSpan, optionSet, cancellationToken).ConfigureAwait(false); 168return await ReduceAsync(document, root.FullSpan, options, cancellationToken).ConfigureAwait(false); 250.ReduceAsync(document, [root.FullSpan], options,
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (2)
35node = root.DescendantNodes(n => n.FullSpan.Contains(change)).LastOrDefault(); 44var span = node.FullSpan;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
117if (currentNode != null && searchSpan.Contains(currentNode.FullSpan) && predicate(currentNode)) 199=> node.FullSpan.Length; 399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 517nodesToReplace = retryAnnotations.GetAnnotatedNodes(root).ToDictionary(n => n.FullSpan); 604return (position < root.FullSpan.End || !(root is ICompilationUnitSyntax)) 638while (token.RawKind != 0 && token.Span.End <= position && token.Span.End <= root.FullSpan.End); 672while (position <= token.SpanStart && root.FullSpan.Start < token.SpanStart); 962var fullSpan = node.FullSpan;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
160if (position == root.FullSpan.End)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
38spansToFormat = node.FullSpan.IsEmpty ? [] : [node.FullSpan];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
366if (root.FullSpan.End == position && operation.TextSpan.End == position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
84var data = new SimpleIndentationData(rootNode.FullSpan, indentation: 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
114textSpan: _rootNode.FullSpan,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.cs (2)
61get { return this.Root.FullSpan.Start; } 66get { return this.Root.FullSpan.End; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (2)
156(node.FullSpan.Start == 0 && _fileBannerMatcher.TryMatch(leadingTriviaToKeep, ref index))) 168Debug.Assert(root.FullSpan.Start == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (1)
44Debug.Assert(ownerOfHeader.FullSpan.Contains(lastTokenOrNodeOfHeader.Span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (5)
104var endToken = (root.FullSpan.End <= textSpan.End) ? 143return root.FullSpan.End == startToken.SpanStart || startToken.FullSpan.End > endToken.FullSpan.Start; 286Contract.ThrowIfFalse(backwardPosition < parentNode.FullSpan.End); 312Contract.ThrowIfFalse(parentNode.FullSpan.Start < forwardPosition); 325var fullSpan = node.FullSpan;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (5)
261[currentRoot.FullSpan], 506positionOfRemovedNode = attributeList.FullSpan.Start; 526positionOfRemovedNode = attributeToRemove.FullSpan.Start; 528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (2)
66if (!node.FullSpan.OverlapsWith(selection)) 75if (node.FullSpan.Contains(selection.Start))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
66bool OverlapsWithSpan(SyntaxNode n) => spansTree.HasIntervalThatOverlapsWith(n.FullSpan.Start, n.FullSpan.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
139var node = token.Parent!.AncestorsAndSelf().First(a => a.FullSpan.Contains(span));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
MSBuildWorkspaceTestBase.cs (3)
96return classBlock.Implements[^1].FullSpan.End; 100return classBlock.Inherits[^1].FullSpan.End; 104return classBlock.BlockStatement.FullSpan.End;
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
CodeCleanup\CodeCleanupTests.cs (6)
60var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 70var cleanDocument = await CodeCleaner.CleanupAsync(document, [root.FullSpan], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 114var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 125var cleanDocument = await CodeCleaner.CleanupAsync(document, [root.FullSpan], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 179provider.ExpectedResult = [root.FullSpan]; 200provider.ExpectedResult = [root.FullSpan];
SolutionTests\SolutionTests.cs (1)
3814Assert.Equal(newRoot.FullSpan.Length, tree3.Length);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
2800var deletionEnd = attributeList.FullSpan.End; 2846var deletionEnd = node.FullSpan.End;
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
CodeModel\VisualBasicCodeModelService.vb (2)
1279Dim deletionEnd = node.FullSpan.End 1356Dim spanEnd = attributeList.FullSpan.End