30 references to FindLastIndex
Microsoft.CodeAnalysis (4)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
281
return self._list.
FindLastIndex
(startIndex, count, match);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
182
return ReadOnlyList.
FindLastIndex
(startIndex, count, match);
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (2)
661
=>
FindLastIndex
(_size - 1, _size, match);
664
=>
FindLastIndex
(startIndex, startIndex + 1, match);
Microsoft.CodeAnalysis.UnitTests (26)
Collections\List\SegmentedList.Generic.Tests.Find.cs (26)
146
Assert.Throws<ArgumentNullException>(() => list.
FindLastIndex
(0, 0, null!)); //"Err_858ahia Expected null match to throw ArgumentNullException"
152
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(int.MinValue, 0, predicate)); //Err_948ahid Expected index=Int32.MinValue to throw ArgumentOutOfRangeException"
157
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(-1, 0, predicate)); //"Err_328ahuaw Expected index=-1 to throw ArgumentOutOfRangeException"
161
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count + 1, 0, predicate)); //"Err_488ajdi Expected index=list.Count + 1 to throw ArgumentOutOfRangeException"
164
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count, 1, predicate)); //"Err_9689ajis Expected index=list.Count to throw ArgumentOutOfRangeException"
167
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(int.MaxValue, 0, predicate)); //"Err_238ajwisa Expected index=Int32.MaxValue to throw ArgumentOutOfRangeException"
173
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count - 1, int.MinValue, predicate)); //"Err_948ahid Expected count=Int32.MinValue to throw ArgumentOutOfRangeException"
176
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count - 1, -1, predicate)); //"Err_328ahuaw Expected count=-1 to throw ArgumentOutOfRangeException"
179
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count - 1, list.Count + 1, predicate)); //"Err_488ajdi Expected count=list.Count + 1 to throw ArgumentOutOfRangeException"
182
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(list.Count - 1, int.MaxValue, predicate)); //"Err_238ajwisa Expected count=Int32.MaxValue to throw ArgumentOutOfRangeException"
190
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(count - 2, count, predicate)); //"Err_018188avbiw Expected index=1 count=list.Length to throw ArgumentOutOfRangeException"
193
Assert.Throws<ArgumentOutOfRangeException>(() => list.
FindLastIndex
(count - 1, count + 1, predicate)); //"Err_6848ajiodxbz Expected index=0 count=list.Length + 1 to throw ArgumentOutOfRangeException"
862
index = list.
FindLastIndex
(count - 1, count, EqualsDelegate);
868
index = list.
FindLastIndex
(count - 1, count, _alwaysTrueDelegate);
872
index = list.
FindLastIndex
(count - 1, count, _alwaysFalseDelegate);
878
index = list.
FindLastIndex
(0, 0, _alwaysTrueDelegate);
883
index = list.
FindLastIndex
(count - 1, count - 1, EqualsDelegate);
891
index = list.
FindLastIndex
(count - 2, count - 1, EqualsDelegate);
896
index = list.
FindLastIndex
(count - 2, count - 1, EqualsDelegate);
901
index = list.
FindLastIndex
(count - 1, count - 1, EqualsDelegate);
906
index = list.
FindLastIndex
(count - 2, count - 2, EqualsDelegate);
911
index = list.
FindLastIndex
(count - 2, count - 2, EqualsDelegate);
916
index = list.
FindLastIndex
(count - 2, count - 2, EqualsDelegate);
921
index = list.
FindLastIndex
(count - 2, count - 2, EqualsDelegate);
942
index = list.
FindLastIndex
(list.Count - 1, list.Count, EqualsDelegate);
952
index = list.
FindLastIndex
(list.Count - 1, list.Count, EqualsDelegate);