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