32 references to FindIndex
Microsoft.CodeAnalysis (4)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
244=> _list.FindIndex(startIndex, count, match);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
153=> ReadOnlyList.FindIndex(startIndex, count, match);
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (2)
612=> FindIndex(0, _size, match); 615=> FindIndex(startIndex, _size - startIndex, match);
Microsoft.CodeAnalysis.UnitTests (28)
Collections\List\SegmentedList.Generic.Tests.Find.cs (28)
89Assert.Throws<ArgumentNullException>(() => list.FindIndex(0, 0, null!)); //"Err_858ahia Expected null match to throw ArgumentNullException" 95Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MinValue, 0, predicate)); //"Err_948ahid Expected index=Int32.MinValue to throw ArgumentOutOfRangeException" 98Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(-1, 0, predicate)); //"Err_328ahuaw Expected index=-1 to throw ArgumentOutOfRangeException" 101Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(list.Count + 1, 0, predicate)); //"Err_488ajdi Expected index=list.Count + 1 to throw ArgumentOutOfRangeException" 104Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(list.Count, 1, predicate)); //"Err_9689ajis Expected index=list.Count to throw ArgumentOutOfRangeException" 107Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException" 113Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, int.MinValue, predicate)); //Err_948ahid Expected count=Int32.MinValue to throw ArgumentOutOfRangeException" 116Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, -1, predicate)); //"Err_328ahuaw Expected count=-1 to throw ArgumentOutOfRangeException" 119Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, list.Count + 1, predicate)); //"Err_488ajdi Expected count=list.Count + 1 to throw ArgumentOutOfRangeException" 122Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException" 130Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(1, count, predicate)); //"Err_018188avbiw Expected index=1 count=list.Length to throw ArgumentOutOfRangeException" 133Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, count + 1, predicate)); //"Err_6848ajiodxbz Expected index=0 count=list.Length + 1 to throw ArgumentOutOfRangeException" 576index = list.FindIndex(0, count, delegate (T item) { return expectedItem == null ? item == null : expectedItem.Equals(item); }); 581index = list.FindIndex(0, count, delegate (T item) { return true; }); 586index = list.FindIndex(0, count, delegate (T item) { return false; }); 590index = list.FindIndex(count, 0, delegate (T item) { return true; }); 597index = list.FindIndex(1, count - 1, EqualsDelegate); 602index = list.FindIndex(0, count - 1, EqualsDelegate); 610index = list.FindIndex(1, count - 1, EqualsDelegate); 615index = list.FindIndex(0, count - 1, EqualsDelegate); 620index = list.FindIndex(1, count - 2, EqualsDelegate); 625index = list.FindIndex(1, count - 2, EqualsDelegate); 630index = list.FindIndex(1, count - 2, EqualsDelegate); 635index = list.FindIndex(1, count - 2, EqualsDelegate); 656index = list.FindIndex(0, list.Count, EqualsDelegate); 661index = list.FindIndex(1, list.Count - 1, EqualsDelegate); 671index = list.FindIndex(0, list.Count, EqualsDelegate); 676index = list.FindIndex(2, list.Count - 2, EqualsDelegate);