Implemented interface members:
95 references to Count
Microsoft.CodeAnalysis (13)
ImmutableSegmentedList`1.cs (2)
81public int Count => _list.Count; 86public bool IsEmpty => _list.Count == 0;
ImmutableSegmentedList`1+ValueBuilder.cs (3)
33public readonly int Count => ReadOnlyList.Count; 62if ((uint)index >= (uint)ReadOnlyList.Count) 106if (ReadOnlyList.Count != 0)
SegmentedList`1.cs (7)
260return Count - 1; 306=> BinarySearch(0, Count, item, null); 309=> BinarySearch(0, Count, item, comparer); 774SegmentedArray.Copy(list._items, 0, _items, index, list.Count); 1032=> Reverse(0, Count); 1064=> Sort(0, Count, null); 1069=> Sort(0, Count, comparer);
Serialization\ObjectReader.cs (1)
338var id = _values.Count;
Microsoft.CodeAnalysis.UnitTests (82)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (5)
69Assert.Equal(1, list.Count); 71Assert.Equal(2, list.Count); 73Assert.Equal(4, list.Count); 77Assert.Equal(5, list.Count); 79Assert.Equal(6, list.Count);
Collections\List\SegmentedList.Generic.Tests.AsNonGenericIList.cs (1)
45while (list.Count < count)
Collections\List\SegmentedList.Generic.Tests.BinarySearch.cs (2)
34Assert.All(Enumerable.Range(0, list.Count), index => 53Assert.All(Enumerable.Range(0, list.Count), index =>
Collections\List\SegmentedList.Generic.Tests.Constructor.cs (3)
29Assert.Equal(0, list.Count); //"Do not expect anything to be in the list." 44Assert.Equal(0, list.Count); //"Do not expect anything to be in the list." 66Assert.Equal(enumerableLength, list.Count); //"Number of items in list do not match the number of items given."
Collections\List\SegmentedList.Generic.Tests.ConvertAll.cs (5)
26Assert.Equal(before.Count, list.Count); 27Assert.Equal(before.Count, after.Count); 29for (int i = 0; i < list.Count; i++)
Collections\List\SegmentedList.Generic.Tests.cs (3)
53Assert.Equal(expectedItems.Count, list.Count); 57for (int i = 0; i < list.Count; ++i)
Collections\List\SegmentedList.Generic.Tests.Find.cs (31)
64if (0 < list.Count) 71Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(list.Count + 1, predicate)); //"Err_488ajdi Expected index=list.Count + 1 to throw ArgumentOutOfRangeException" 74Assert.Throws<ArgumentOutOfRangeException>(() => list.FindLastIndex(list.Count, predicate)); //"Err_9689ajis Expected index=list.Count 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" 119Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(0, list.Count + 1, predicate)); //"Err_488ajdi Expected count=list.Count + 1 to throw ArgumentOutOfRangeException" 154if (0 < list.Count) 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" 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" 218Assert.Throws<ArgumentOutOfRangeException>(() => list.FindIndex(list.Count + 1, predicate)); //"Err_488ajdi Expected index=list.Count + 1 to throw ArgumentOutOfRangeException" 257list.RemoveAt(list.Count - 1); 335list.RemoveAt(list.Count - 1); 635index = list.FindIndex(0, list.Count, EqualsDelegate); 640index = list.FindIndex(1, list.Count - 1, EqualsDelegate); 650index = list.FindIndex(0, list.Count, EqualsDelegate); 655index = list.FindIndex(2, list.Count - 2, EqualsDelegate); 795index = list.FindLastIndex(list.Count - 1, EqualsDelegate); 810index = list.FindLastIndex(list.Count - 1, EqualsDelegate); 811Assert.Equal(list.Count - 1, index); //"Err_29892adewiu Verify second item is duplicated" 815index = list.FindLastIndex(list.Count - 3, EqualsDelegate); 921index = list.FindLastIndex(list.Count - 1, list.Count, EqualsDelegate); 922Assert.Equal(list.Count - 1, index); //"Err_3282iahid Verify first item is duplicated" 931index = list.FindLastIndex(list.Count - 1, list.Count, EqualsDelegate); 932Assert.Equal(list.Count - 1, index); //"Err_29892adewiu Verify second item is duplicated"
Collections\List\SegmentedList.Generic.Tests.IndexOf.cs (4)
46return ((SegmentedList<T> list, T value) => { return list.IndexOf(value, 0, list.Count); }); 50return ((SegmentedList<T> list, T value) => { return list.LastIndexOf(value, list.Count - 1); }); 52return ((SegmentedList<T> list, T value) => { return list.LastIndexOf(value, list.Count - 1, list.Count); });
Collections\List\SegmentedList.Generic.Tests.Misc.cs (21)
51Assert.Equal(list.Count, items.Length + repeat); //"Expect to be the same." 63for (int i = index + repeat; i < list.Count; i++) 90Assert.Equal(list.Count, items.Length + repeat); //"Expected them to be equal." 102for (int i = index + repeat; i < list.Count; i++) 138Assert.Equal(list.Count, itemsX.Length + (itemsY.Length * repeat)); //"Should have the same result." 150for (int i = index + (itemsY.Length * repeat); i < list.Count; i++) 163Assert.Equal(list.Count, itemsX.Length + (itemsX.Length)); //"Should have the same result." 175for (int i = index + (itemsX.Length); i < list.Count; i++) 366list.RemoveAt(list.Count - 1); 569Assert.Equal(0, list.Count); //"Should be equal to 0" 571Assert.Equal(0, list.Count); //"Should be equal to 0." 576Assert.Equal(0, list.Count); //"Should be equal to 0." 580Assert.Equal(0, list.Count); //"Should be equal to 0." 587Assert.Equal(0, list.Count); //"Should be equal to 0." 596Assert.Equal(0, list.Count); //"Should be equal to 0." 604Assert.Equal(0, list.Count); //"Should be equal to 0." 606Assert.Equal(0, list.Count); //"Should be equal to 0." 612Assert.Equal(0, list.Count); //"Should be equal to 0." 616Assert.Equal(0, list.Count); //"Should be equal to 0." 624Assert.Equal(0, list.Count); //"Should be equal to 0." 634Assert.Equal(0, list.Count); //"Should be equal to 0."
Collections\List\SegmentedList.Generic.Tests.Remove.cs (3)
33Assert.Equal(0, list.Count); 44Assert.Equal(count, list.Count); 86Assert.Equal(list.Count, listLength - count); //"Expected them to be the same."
Collections\List\SegmentedList.Generic.Tests.Reverse.cs (4)
33for (int i = 0; i < listBefore.Count; i++) 35Assert.Equal(list[i], listBefore[listBefore.Count - (i + 1)]); //"Expect them to be the same." 68for (int i = index + count; i < listBefore.Count; i++) 105for (int i = index + count; i < listBefore.Count; i++)