21 references to Intersection
Microsoft.CodeAnalysis (1)
Syntax\SyntaxTreeExtensions.cs (1)
45var textSpanOpt = span.Intersection(fullSpan);
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
45var textSpanOpt = span.Intersection(fullSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
226spans.Add(span1.Intersection(span2)!.Value);
Microsoft.CodeAnalysis.UnitTests (16)
Text\TextSpanTest.cs (16)
301Assert.Equal(span1.Intersection(span2), new TextSpan(10, 0)); 302Assert.Equal(span2.Intersection(span1), new TextSpan(10, 0)); 313Assert.Null(span1.Intersection(span2)); 314Assert.Null(span2.Intersection(span1)); 325Assert.Equal(span1.Intersection(span2), new TextSpan(10, 5)); 326Assert.Equal(span2.Intersection(span1), new TextSpan(10, 5)); 337Assert.Equal(span1.Intersection(span2), new TextSpan(10, 0)); 338Assert.Equal(span2.Intersection(span1), new TextSpan(10, 0)); 349Assert.Equal(span1.Intersection(span2), new TextSpan(7, 0)); 350Assert.Equal(span2.Intersection(span1), new TextSpan(7, 0)); 361Assert.Equal(span1.Intersection(span2), new TextSpan(3, 0)); 362Assert.Equal(span2.Intersection(span1), new TextSpan(3, 0)); 373Assert.Equal(span1.Intersection(span2), new TextSpan(2, 0)); 374Assert.Equal(span2.Intersection(span1), new TextSpan(2, 0)); 385Assert.Equal(span1.Intersection(span2), new TextSpan(7, 0)); 386Assert.Equal(span2.Intersection(span1), new TextSpan(7, 0));
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
45var textSpanOpt = span.Intersection(fullSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
226spans.Add(span1.Intersection(span2)!.Value);