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)
89
Assert.Throws<ArgumentNullException>(() => list.
FindIndex
(0, 0, null!)); //"Err_858ahia Expected null match to throw ArgumentNullException"
95
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(int.MinValue, 0, predicate)); //"Err_948ahid Expected index=Int32.MinValue to throw ArgumentOutOfRangeException"
98
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(-1, 0, predicate)); //"Err_328ahuaw Expected index=-1 to throw ArgumentOutOfRangeException"
101
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(list.Count + 1, 0, predicate)); //"Err_488ajdi Expected index=list.Count + 1 to throw ArgumentOutOfRangeException"
104
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(list.Count, 1, predicate)); //"Err_9689ajis Expected index=list.Count to throw ArgumentOutOfRangeException"
107
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
113
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(0, int.MinValue, predicate)); //Err_948ahid Expected count=Int32.MinValue to throw ArgumentOutOfRangeException"
116
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(0, -1, predicate)); //"Err_328ahuaw Expected count=-1 to throw ArgumentOutOfRangeException"
119
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(0, list.Count + 1, predicate)); //"Err_488ajdi Expected count=list.Count + 1 to throw ArgumentOutOfRangeException"
122
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(0, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException"
130
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(1, count, predicate)); //"Err_018188avbiw Expected index=1 count=list.Length to throw ArgumentOutOfRangeException"
133
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindIndex
(0, count + 1, predicate)); //"Err_6848ajiodxbz Expected index=0 count=list.Length + 1 to throw ArgumentOutOfRangeException"
576
index = list.
FindIndex
(0, count, delegate (T item) { return expectedItem == null ? item == null : expectedItem.Equals(item); });
581
index = list.
FindIndex
(0, count, delegate (T item) { return true; });
586
index = list.
FindIndex
(0, count, delegate (T item) { return false; });
590
index = list.
FindIndex
(count, 0, delegate (T item) { return true; });
597
index = list.
FindIndex
(1, count - 1, EqualsDelegate);
602
index = list.
FindIndex
(0, count - 1, EqualsDelegate);
610
index = list.
FindIndex
(1, count - 1, EqualsDelegate);
615
index = list.
FindIndex
(0, count - 1, EqualsDelegate);
620
index = list.
FindIndex
(1, count - 2, EqualsDelegate);
625
index = list.
FindIndex
(1, count - 2, EqualsDelegate);
630
index = list.
FindIndex
(1, count - 2, EqualsDelegate);
635
index = list.
FindIndex
(1, count - 2, EqualsDelegate);
656
index = list.
FindIndex
(0, list.Count, EqualsDelegate);
661
index = list.
FindIndex
(1, list.Count - 1, EqualsDelegate);
671
index = list.
FindIndex
(0, list.Count, EqualsDelegate);
676
index = list.
FindIndex
(2, list.Count - 2, EqualsDelegate);