8 references to BinarySearch
Microsoft.CodeAnalysis (4)
ImmutableSegmentedList`1.cs (1)
196=> _list.BinarySearch(index, count, item, comparer);
ImmutableSegmentedList`1+ValueBuilder.cs (1)
102=> ReadOnlyList.BinarySearch(index, count, item, comparer);
SegmentedList`1.cs (2)
306=> BinarySearch(0, Count, item, null); 309=> BinarySearch(0, Count, item, comparer);
Microsoft.CodeAnalysis.UnitTests (4)
Collections\List\SegmentedList.Generic.Tests.BinarySearch.cs (4)
69Assert.Throws<ArgumentException>(null, () => list.BinarySearch(0, count + 1, element, GetIComparer())); //"Finding items longer than array should throw ArgumentException" 70Assert.Throws<ArgumentOutOfRangeException>(() => list.BinarySearch(-1, count, element, GetIComparer())); //"ArgumentOutOfRangeException should be thrown on negative index." 71Assert.Throws<ArgumentOutOfRangeException>(() => list.BinarySearch(0, -1, element, GetIComparer())); //"ArgumentOutOfRangeException should be thrown on negative count." 72Assert.Throws<ArgumentException>(null, () => list.BinarySearch(count + 1, count, element, GetIComparer())); //"ArgumentException should be thrown on index greater than length of array."