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