109 references to IntersectsWith
Microsoft.CodeAnalysis (5)
Diagnostic\Diagnostic.cs (1)
523return !filterSpan.HasValue || filterSpan.GetValueOrDefault().IntersectsWith(location.SourceSpan);
DiagnosticAnalyzer\AnalysisScope.cs (1)
284return !FilterSpanOpt.HasValue || FilterSpanOpt.GetValueOrDefault().IntersectsWith(filterSpan);
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
113(!FilterSpanForLocalDiagnostics.HasValue || FilterSpanForLocalDiagnostics.Value.IntersectsWith(diagnostic.Location.SourceSpan)))
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1411if (diagnostic.Location.SourceSpan.IntersectsWith(syntax.FullSpan))
Syntax\SyntaxNode.Iterators.cs (1)
42|| (childSpan.Length == 0 && span.IntersectsWith(childSpan));
Microsoft.CodeAnalysis.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (3)
224if (span1.IntersectsWith(span2)) 461if (span1.IntersectsWith(span2)) 488if (this[index].IntersectsWith(span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (1)
15=> !contextFilterSpan.HasValue || span.IntersectsWith(contextFilterSpan.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
437if (previous == default || !previous.IntersectsWith(span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
322else if (span.IntersectsWith(last))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
97if (operation.TextSpan.IntersectsWith(self._span))
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
66if (token.Span.IntersectsWith(span))
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
35if (!token.Span.IntersectsWith(context.Span))
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
38if (!token.Span.IntersectsWith(span))
Microsoft.CodeAnalysis.CSharp (8)
Parser\Blender.Reader.cs (1)
288return oldSpan.IntersectsWith(changeSpan);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1025(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)))
Symbols\Source\SourceNamespaceSymbol.cs (1)
480if (syntax.FullSpan.IntersectsWith(definedWithinSpan.Value))
Symbols\Symbol.cs (1)
955(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value));
Syntax\SyntaxNodeRemover.cs (1)
161return node.FullSpan.IntersectsWith(_searchSpan) || (_residualTrivia != null && _residualTrivia.Count > 0);
Syntax\SyntaxReplacer.cs (3)
159if (!span.IntersectsWith(_totalSpan)) 168if (span.IntersectsWith(s)) 317if (span.IntersectsWith(_elementSpan))
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
226descendentNode.Span.IntersectsWith(comparisonEnclosingBlock.Span) &&
Microsoft.CodeAnalysis.CSharp.Features (4)
Copilot\CSharpCopilotCodeFixProvider.cs (1)
82if (containingMethod?.Span.IntersectsWith(context.Span) is true)
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
129.DescendantNodes(d => d.Span.IntersectsWith(span)) 131.Where(n => n.Span.IntersectsWith(span));
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
226descendentNode.Span.IntersectsWith(comparisonEnclosingBlock.Span) &&
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
42if (operatorSpan.IsEmpty || !operatorSpan.IntersectsWith(textSpan))
Microsoft.CodeAnalysis.Features (7)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (2)
122if (token.Span.IntersectsWith(_textSpan) && _owner.SyntaxTokenKinds.Contains(token.RawKind)) 155if (trivia.IsDirective && trivia.FullSpan.IntersectsWith(_textSpan))
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (1)
67if (span.IntersectsWith(_spanToClassify))
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
301span.IntersectsWith(constructor.span))
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
49if (!token.Span.IntersectsWith(span))
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
66if (token.Span.IntersectsWith(span))
Testing\AbstractTestMethodFinder.cs (1)
110return node.Span.IntersectsWith(textSpan) && DescendIntoChildren(node);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
385bool shouldInclude(Diagnostic d) => span.Value.IntersectsWith(d.Location.SourceSpan) && !IsUnusedImportDiagnostic(d);
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
410if (span.HasValue && !span.Value.IntersectsWith(diagnostic.Location.SourceSpan))
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
485!selection.IntersectsWith(actionAndSpan.applicableSpan.Value))
Microsoft.CodeAnalysis.UnitTests (16)
Text\TextSpanTest.cs (16)
299Assert.True(span1.IntersectsWith(span2)); 300Assert.True(span2.IntersectsWith(span1)); 311Assert.False(span1.IntersectsWith(span2)); 312Assert.False(span2.IntersectsWith(span1)); 323Assert.True(span1.IntersectsWith(span2)); 324Assert.True(span2.IntersectsWith(span1)); 335Assert.True(span1.IntersectsWith(span2)); 336Assert.True(span2.IntersectsWith(span1)); 347Assert.True(span1.IntersectsWith(span2)); 348Assert.True(span2.IntersectsWith(span1)); 359Assert.True(span1.IntersectsWith(span2)); 360Assert.True(span2.IntersectsWith(span1)); 371Assert.True(span1.IntersectsWith(span2)); 372Assert.True(span2.IntersectsWith(span1)); 383Assert.True(span1.IntersectsWith(span2)); 384Assert.True(span2.IntersectsWith(span1));
Microsoft.CodeAnalysis.VisualBasic (6)
Symbols\Symbol.vb (2)
909(Not definedWithinSpan.HasValue OrElse syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)) Then 920(Not definedWithinSpan.HasValue OrElse definedWithinSpan.Value.IntersectsWith(syntaxNode.FullSpan))
Syntax\SyntaxNodeRemover.vb (1)
104Return node.FullSpan.IntersectsWith(Me._searchSpan) OrElse (Me._residualTrivia IsNot Nothing AndAlso Me._residualTrivia.Count > 0)
Syntax\SyntaxReplacer.vb (3)
132If Not span.IntersectsWith(Me._totalSpan) Then 137If span.IntersectsWith(s) Then 257Return span.IntersectsWith(Me._elementSpan)
Microsoft.CodeAnalysis.VisualBasic.Features (6)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
68If Not token.Span.IntersectsWith(context.Span) Then
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
48If Not token.Span.IntersectsWith(context.Span) Then
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
65If Not token.Span.IntersectsWith(span) Then
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
48If Not token.Span.IntersectsWith(span) Then
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
50If Not token.Span.IntersectsWith(span) Then
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
74Dim fields = root.DescendantNodes(Function(n) n.Span.IntersectsWith(span)) _
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
36If operatorSpan.IsEmpty OrElse Not operatorSpan.IntersectsWith(textSpan) Then
Microsoft.CodeAnalysis.Workspaces (17)
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (2)
109if (child.FullSpan.IntersectsWith(_textSpan)) 175if (trivia.HasStructure && trivia.FullSpan.IntersectsWith(_textSpan))
Diagnostics\Extensions.cs (1)
322filterSpan.HasValue && !filterSpan.Value.IntersectsWith(diagnostic.Location.SourceSpan));
Editing\SymbolEditor.cs (1)
411var declaration = this.GetDeclarations(currentSymbol).FirstOrDefault(d => memberDecls.Any(md => md.SyntaxTree == d.SyntaxTree && d.FullSpan.IntersectsWith(md.FullSpan)));
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
163if (!cumulativeChange.Span.IntersectsWith(change.Span))
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
72if (current.Span.IntersectsWith(span))
ReassignedVariable\AbstractReassignedVariableService.cs (1)
77if (current.Span.IntersectsWith(span))
Recommendations\AbstractRecommendationServiceRunner.cs (1)
354declarationSyntax.Span.IntersectsWith(candidateLocation.SourceSpan)), declarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (3)
224if (span1.IntersectsWith(span2)) 461if (span1.IntersectsWith(span2)) 488if (this[index].IntersectsWith(span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (1)
15=> !contextFilterSpan.HasValue || span.IntersectsWith(contextFilterSpan.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
437if (previous == default || !previous.IntersectsWith(span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
322else if (span.IntersectsWith(last))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
97if (operation.TextSpan.IntersectsWith(self._span))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
367if (!selectionTrimmed.IntersectsWith(spanWithoutAttributes))
Microsoft.VisualStudio.LanguageServices (2)
Venus\ContainedDocument.cs (1)
513if (!visibleSpanInOriginalText.IntersectsWith(spanInOriginalText))
Workspace\VisualStudioFormattingRuleFactoryServiceFactory.cs (1)
110return changes.Where(c => span.IntersectsWith(c.Span));
Microsoft.VisualStudio.LanguageServices.VisualBasic (21)
Help\VisualBasicHelpContextService.vb (1)
47If token.Span.IntersectsWith(span) OrElse token.GetAncestor(Of XmlElementSyntax)() IsNot Nothing Then
Help\VisualBasicHelpContextService.Visitor.vb (20)
169If node.ThenKeyword.Span.IntersectsWith(_span) Then 177If node.ThenKeyword.Span.IntersectsWith(_span) Then 185If node.ThenKeyword.Span.IntersectsWith(_span) Then 253If node.InKeyword.Span.IntersectsWith(_span) Then 255ElseIf node.EachKeyword.Span.IntersectsWith(_span) Then 263If node.ToKeyword.Span.IntersectsWith(_span) Then 265ElseIf node.StepClause.StepKeyword.Span.IntersectsWith(_span) Then 277If node.VarianceKeyword.Span.IntersectsWith(_span) Then 303If node.IntoKeyword.Span.IntersectsWith(_span) Then 311If node.OnKeyword.Span.IntersectsWith(_span) Then 313ElseIf node.IntoKeyword.Span.IntersectsWith(_span) Then 376ElseIf node.Identifier.Span.IntersectsWith(_span) AndAlso 415If node.KeyKeyword.Span.IntersectsWith(_span) Then 520If node.Name.Span.IntersectsWith(_span) Then 771If modifier.Span.IntersectsWith(_span) Then 831If node.OfKeyword.Span.IntersectsWith(_span) Then 924If node.InKeyword.Span.IntersectsWith(_span) Then 933If node.OperatorToken.Span.IntersectsWith(_span) Then 937If node.DeclarationKeyword.Span.IntersectsWith(_span) Then 948If Not token.Span.IntersectsWith(_span) Then