148 references to IntersectsWith
Microsoft.CodeAnalysis (5)
Diagnostic\Diagnostic.cs (1)
521return !filterSpan.HasValue || filterSpan.GetValueOrDefault().IntersectsWith(location.SourceSpan);
DiagnosticAnalyzer\AnalysisScope.cs (1)
210return !FilterSpanOpt.HasValue || FilterSpanOpt.GetValueOrDefault().IntersectsWith(filterSpan);
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
105(!_span.HasValue || _span.Value.IntersectsWith(diagnostic.Location.SourceSpan)))
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1371if (diagnostic.Location.SourceSpan.IntersectsWith(syntax.FullSpan))
Syntax\SyntaxNode.Iterators.cs (1)
42|| (childSpan.Length == 0 && span.IntersectsWith(childSpan));
Microsoft.CodeAnalysis.CodeStyle (10)
BaseIndentationFormattingRule.cs (1)
97if (operation.TextSpan.IntersectsWith(self._span))
FormattingContext.cs (1)
573if (!baseAnchorData.TextSpan.IntersectsWith(interval.AnchorToken.Span))
FormattingContext.InitialContextFinder.cs (2)
77node.DescendantNodesAndSelf(n => n != previous && n.Span.IntersectsWith(span) && !span.Contains(n.Span)) 103operations.RemoveAll(o => o == null || !o.TextSpan.IntersectsWith(span));
FormattingExtensions.cs (1)
338else if (span.IntersectsWith(last))
LocationExtensions.cs (1)
45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
NormalizedTextSpanCollection.cs (3)
224if (span1.IntersectsWith(span2)) 461if (span1.IntersectsWith(span2)) 488if (this[index].IntersectsWith(span))
SyntaxNodeExtensions.cs (1)
454if (previous == default || !previous.IntersectsWith(span))
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractUserDiagnosticTest.cs (1)
144var intersectingDiagnostics = diagnostics.Where(d => d.Location.SourceSpan.IntersectsWith(span))
Microsoft.CodeAnalysis.CSharp (10)
Parser\Blender.Reader.cs (1)
291return oldSpan.IntersectsWith(changeSpan);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1003(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)))
Symbols\Source\SourceMemberFieldSymbol.cs (1)
639return fieldDeclaration.SyntaxTree.HasCompilationUnitRoot && fieldDeclaration.Span.IntersectsWith(definedWithinSpan.Value);
Symbols\Source\SourceNamespaceSymbol.cs (1)
504if (syntax.FullSpan.IntersectsWith(definedWithinSpan.Value))
Symbols\Symbol.cs (1)
813(!definedWithinSpan.HasValue || syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)))
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
271if (global.Span.IntersectsWith(span))
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)
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
217descendentNode.Span.IntersectsWith(comparisonEnclosingBlock.Span) &&
Microsoft.CodeAnalysis.CSharp.Features (8)
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (2)
64if (!context.Span.IntersectsWith(token.Span)) 198Contract.ThrowIfFalse(span.IntersectsWith(token.Span));
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
217descendentNode.Span.IntersectsWith(comparisonEnclosingBlock.Span) &&
EncapsulateField\CSharpEncapsulateFieldService.cs (3)
133var fields = root.DescendantNodes(d => d.Span.IntersectsWith(span)) 135.Where(n => n.Span.IntersectsWith(span)); 148declarators = declarations.SelectMany(d => d.Variables.Where(v => v.Span.IntersectsWith(span)));
ImplementInterface\CSharpImplementInterfaceCodeFixProvider.cs (1)
48if (!token.Span.IntersectsWith(span))
StringIndentation\CSharpStringIndentationService.cs (1)
59if (!node.Span.IntersectsWith(textSpan))
Microsoft.CodeAnalysis.EditorFeatures (3)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
482if (!mergeConflictComments.Any(s => replacement.NewSpan.IntersectsWith(s))) 499if (_activeSpan.HasValue && _activeSpan.Value.IntersectsWith(replacement.OriginalSpan)) 507if (!mergeConflictComments.Any(s => replacement.NewSpan.IntersectsWith(s)))
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
Diagnostics\AbstractUserDiagnosticTest.cs (1)
144var intersectingDiagnostics = diagnostics.Where(d => d.Location.SourceSpan.IntersectsWith(span))
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Diagnostics\TestDiagnosticAnalyzerDriver.cs (1)
66: dxs.Where(d => d.DataLocation.DocumentId != null && d.DataLocation.UnmappedFileSpan.GetClampedTextSpan(text).IntersectsWith(filterSpan.Value)),
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Preview\PreviewStaticClassificationTaggerProvider.cs (1)
79if (classifiedSpan.TextSpan.IntersectsWith(requestSpan))
Microsoft.CodeAnalysis.Features (15)
BracePairs\IBracePairsService.cs (1)
62if (!current.Span.IntersectsWith(span))
CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
66if (token.Span.IntersectsWith(span))
CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
366if (!selectionTrimmed.IntersectsWith(spanWithoutAttributes))
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
40if (!context.Span.IntersectsWith(token.Span))
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (3)
92if (currentNodeOrToken.Span.IntersectsWith(_textSpan)) 119if (token.Span.IntersectsWith(_textSpan) && _owner.SyntaxTokenKinds.Contains(token.RawKind)) 152if (trivia.HasStructure && trivia.FullSpan.IntersectsWith(_textSpan))
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
330span.IntersectsWith(constructor.span))
ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
34if (!token.Span.IntersectsWith(context.Span))
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
72foreach (var node in root.DescendantNodes(textSpan, n => n.Span.IntersectsWith(textSpan)))
InlineHints\AbstractInlineTypeHintsService.cs (1)
62foreach (var node in root.DescendantNodes(n => n.Span.IntersectsWith(textSpan)))
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (2)
49if (!token.Span.IntersectsWith(span)) 58if (node.Span.IntersectsWith(span) && CanSimplifyTypeNameExpression(model, node, options, span, out var diagnosticId, cancellationToken))
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
136fieldDocument.Id == documentId ? !span.IntersectsWith(declaratorLocation.SourceSpan) : true && // The span check only makes sense if we are in the same file
ValueTracking\ValueTracker.cs (1)
43if (declaringSyntaxReferences.Any(static (r, selection) => r.Span.IntersectsWith(selection), selection))
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\Diagnostics\DocumentAnalysisExecutor.cs (2)
166d => d.DocumentId is null || span.Value.IntersectsWith(d.DataLocation.UnmappedFileSpan.GetClampedTextSpan(sourceText))); 362bool shouldInclude(Diagnostic d) => span.Value.IntersectsWith(d.Location.SourceSpan) && !IsUnusedImportDiagnostic(d);
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
398if (span.HasValue && !span.Value.IntersectsWith(diagnostic.Location.SourceSpan))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
431(_range == null || _range.Value.IntersectsWith(diagnostic.DataLocation.UnmappedFileSpan.GetClampedTextSpan(_text)))
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
493!selection.IntersectsWith(actionAndSpan.applicableSpan.Value))
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
89: SerializableClassifiedSpans.Dehydrate(classifiedSpans.WhereAsArray(c => c.TextSpan.IntersectsWith(textSpan)));
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 (9)
Symbols\Source\SourceFile.vb (3)
198If filterSpan.HasValue AndAlso Not filterSpan.Value.IntersectsWith(optionStmtSyntax.FullSpan) Then 252If filterSpan.HasValue AndAlso Not filterSpan.Value.IntersectsWith(statement.FullSpan) Then 260If filterSpan.HasValue AndAlso Not filterSpan.Value.IntersectsWith(statement.FullSpan) Then
Symbols\Symbol.vb (2)
849(Not definedWithinSpan.HasValue OrElse syntaxRef.Span.IntersectsWith(definedWithinSpan.Value)) Then 860(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 (17)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (2)
68If Not token.Span.IntersectsWith(context.Span) Then 73.FirstOrDefault(Function(c) c.Span.IntersectsWith(context.Span) AndAlso IsCandidate(c))
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (2)
48If Not token.Span.IntersectsWith(context.Span) Then 53For Each node In token.GetAncestors(Of SyntaxNode).Where(Function(c) c.Span.IntersectsWith(context.Span) AndAlso IsCandidate(c))
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
65If Not token.Span.IntersectsWith(span) Then 71Return c.Span.IntersectsWith(span) AndAlso (
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (2)
48If Not token.Span.IntersectsWith(span) Then 75.FirstOrDefault(Function(c) c.Span.IntersectsWith(span))
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (2)
50If Not token.Span.IntersectsWith(span) Then 56.FirstOrDefault(Function(c) c.Span.IntersectsWith(span))
EncapsulateField\VisualBasicEncapsulateFieldService.vb (3)
76Dim fields = root.DescendantNodes(Function(n) n.Span.IntersectsWith(span)) _ 78.Where(Function(n) n.Span.IntersectsWith(span) AndAlso CanEncapsulate(n)) 86names = fields.SelectMany(Function(f) f.Declarators.SelectMany(Function(d) d.Names.Where(Function(n) n.Span.IntersectsWith(span))))
ImplementInterface\VisualBasicImplementInterfaceCodeFixProvider.vb (4)
45If Not token.Span.IntersectsWith(span) Then 50.FirstOrDefault(Function(c) c.Span.IntersectsWith(span)) 55Dim typeNode = implementsNode.Types.Where(Function(c) c.Span.IntersectsWith(span)) _ 56.FirstOrDefault(Function(c) c.Span.IntersectsWith(span))
Microsoft.CodeAnalysis.Workspaces (16)
BaseIndentationFormattingRule.cs (1)
97if (operation.TextSpan.IntersectsWith(self._span))
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (1)
97if (nodeOrToken.FullSpan.IntersectsWith(_textSpan))
Diagnostics\Extensions.cs (1)
305filterSpan.HasValue && !filterSpan.Value.IntersectsWith(diagnostic.Location.SourceSpan));
Editing\SymbolEditor.cs (1)
409var declaration = this.GetDeclarations(currentSymbol).FirstOrDefault(d => memberDecls.Any(md => md.SyntaxTree == d.SyntaxTree && d.FullSpan.IntersectsWith(md.FullSpan)));
FormattingContext.cs (1)
573if (!baseAnchorData.TextSpan.IntersectsWith(interval.AnchorToken.Span))
FormattingContext.InitialContextFinder.cs (2)
77node.DescendantNodesAndSelf(n => n != previous && n.Span.IntersectsWith(span) && !span.Contains(n.Span)) 103operations.RemoveAll(o => o == null || !o.TextSpan.IntersectsWith(span));
FormattingExtensions.cs (1)
338else if (span.IntersectsWith(last))
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
160if (!cumulativeChange.Span.IntersectsWith(change.Span))
LocationExtensions.cs (1)
45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
NormalizedTextSpanCollection.cs (3)
224if (span1.IntersectsWith(span2)) 461if (span1.IntersectsWith(span2)) 488if (this[index].IntersectsWith(span))
ReassignedVariable\AbstractReassignedVariableService.cs (1)
64if (current.Span.IntersectsWith(span))
Recommendations\AbstractRecommendationServiceRunner.cs (1)
307declarationSyntax.Span.IntersectsWith(candidateLocation.SourceSpan)), declarationSyntax);
SyntaxNodeExtensions.cs (1)
454if (previous == default || !previous.IntersectsWith(span))
Microsoft.VisualStudio.LanguageServices (3)
Venus\ContainedDocument.cs (1)
516if (!visibleSpanInOriginalText.IntersectsWith(spanInOriginalText))
Workspace\VisualStudioFormattingRuleFactoryServiceFactory.cs (2)
83if (visibleSpan.IntersectsWith(line.Span)) 114return changes.Where(c => span.IntersectsWith(c.Span));
Microsoft.VisualStudio.LanguageServices.CSharp (3)
LanguageService\CSharpHelpContextService.cs (3)
52if (token.Span.IntersectsWith(span)) 60if (previousToken.Span.IntersectsWith(span)) 69if (trivia.Span.IntersectsWith(span) && trivia.Kind() == SyntaxKind.PreprocessingMessageTrivia &&
Microsoft.VisualStudio.LanguageServices.VisualBasic (22)
Help\VisualBasicHelpContextService.vb (1)
47If token.Span.IntersectsWith(span) OrElse token.GetAncestor(Of XmlElementSyntax)() IsNot Nothing Then
Help\VisualBasicHelpContextService.Visitor.vb (21)
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 516If node.Name.Span.IntersectsWith(_span) Then 767If modifier.Span.IntersectsWith(_span) Then 808Dim bestName = node.Names.FirstOrDefault(Function(n) n.Span.IntersectsWith(_span)) 827If node.OfKeyword.Span.IntersectsWith(_span) Then 920If node.InKeyword.Span.IntersectsWith(_span) Then 929If node.OperatorToken.Span.IntersectsWith(_span) Then 933If node.DeclarationKeyword.Span.IntersectsWith(_span) Then 944If Not token.Span.IntersectsWith(_span) Then