2 instantiations of ImmutableIntervalTree
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (2)
25public static readonly ImmutableIntervalTree<T> Empty = new(new SegmentedArray<Node>(0)); 94return new ImmutableIntervalTree<T>(array);
38 references to ImmutableIntervalTree
Microsoft.CodeAnalysis.CSharp.Features (5)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (5)
484private static (ImmutableIntervalTree<TextSpan> interpolationInteriorSpans, ImmutableIntervalTree<TextSpan> restrictedSpans) GetInterpolationSpans( 524ImmutableIntervalTree<TextSpan>.CreateFromUnsorted(new TextSpanIntervalIntrospector(), interpolationInteriorSpans), 525ImmutableIntervalTree<TextSpan>.CreateFromUnsorted(new TextSpanIntervalIntrospector(), restrictedSpans)); 639ImmutableIntervalTree<TextSpan> interpolationInteriorSpans)
Microsoft.CodeAnalysis.EditorFeatures (3)
Shared\Tagging\Utilities\TagSpanIntervalTree.cs (3)
30private readonly ImmutableIntervalTree<TagSpan<TTag>> _tree = ImmutableIntervalTree<TagSpan<TTag>>.Empty; 42_tree = ImmutableIntervalTree<TagSpan<TTag>>.CreateFromSorted(
Microsoft.CodeAnalysis.Workspaces (17)
Classification\ClassifierHelper.cs (2)
254var semanticPartsTree = ImmutableIntervalTree<TClassifiedSpan>.CreateFromUnsorted(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (15)
25public static readonly ImmutableIntervalTree<T> Empty = new(new SegmentedArray<Node>(0)); 45public IntervalTreeAlgorithms<T, ImmutableIntervalTree<T>> Algorithms => new(this); 48/// Creates a <see cref="ImmutableIntervalTree{T}"/> from an unsorted list of <paramref name="values"/>. This will 55public static ImmutableIntervalTree<T> CreateFromUnsorted<TIntrospector>(in TIntrospector introspector, SegmentedList<T> values) 74public static ImmutableIntervalTree<T> CreateFromSorted<TIntrospector>(in TIntrospector introspector, SegmentedList<T> values) 265=> IntervalTreeHelpers<T, ImmutableIntervalTree<T>, /*TNode*/ int, FlatArrayIntervalTreeWitness>.Any(this, start, length, introspector, intervalTester); 272return IntervalTreeHelpers<T, ImmutableIntervalTree<T>, /*TNode*/ int, FlatArrayIntervalTreeWitness>.FillWithIntervalsThatMatch( 282public IntervalTreeHelpers<T, ImmutableIntervalTree<T>, /*TNode*/ int, FlatArrayIntervalTreeWitness>.Enumerator GetEnumerator() 283=> IntervalTreeHelpers<T, ImmutableIntervalTree<T>, /*TNode*/ int, FlatArrayIntervalTreeWitness>.GetEnumerator(this); 288internal readonly struct FlatArrayIntervalTreeWitness : IIntervalTreeWitness<T, ImmutableIntervalTree<T>, int> 290public T GetValue(ImmutableIntervalTree<T> tree, int node) 293public int GetMaxEndNode(ImmutableIntervalTree<T> tree, int node) 296public bool TryGetRoot(ImmutableIntervalTree<T> tree, out int root) 302public bool TryGetLeftNode(ImmutableIntervalTree<T> tree, int node, out int leftNode) 308public bool TryGetRightNode(ImmutableIntervalTree<T> tree, int node, out int rightNode)
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
UtilityTest\IntervalTreeTests.cs (8)
376yield return ImmutableIntervalTree<Tuple<int, int, string>>.CreateFromUnsorted(new TupleIntrospector<string>(), [.. values]); 381return ((ImmutableIntervalTree<Tuple<int, int, string>>)tree).Algorithms.HasIntervalThatIntersectsWith(position, new TupleIntrospector<string>()); 386return ((ImmutableIntervalTree<Tuple<int, int, string>>)tree).Algorithms.GetIntervalsThatIntersectWith(start, length, new TupleIntrospector<string>()); 391return ((ImmutableIntervalTree<Tuple<int, int, string>>)tree).Algorithms.GetIntervalsThatOverlapWith(start, length, new TupleIntrospector<string>()); 411var tree = ImmutableIntervalTree<int>.CreateFromUnsorted(new Int32IntervalIntrospector(), [.. Enumerable.Range(1, i)]); 437var tree = ImmutableIntervalTree<int>.CreateFromSorted(new Int32IntervalIntrospector(), [.. allInts]);
Microsoft.VisualStudio.LanguageServices (5)
DocumentOutline\DocumentOutlineViewModel.cs (3)
316var intervalTree = ImmutableIntervalTree<DocumentSymbolDataViewModel>.CreateFromUnsorted( 449var modelTree = this.LastPresentedViewState.ViewModelItemsTree;
DocumentOutline\DocumentOutlineViewModel.DocumentOutlineViewState.cs (2)
43public readonly ImmutableIntervalTree<DocumentSymbolDataViewModel> ViewModelItemsTree; 49ImmutableIntervalTree<DocumentSymbolDataViewModel> viewModelItemsTree)