Implemented interface members:
102 references to Count
Microsoft.CodeAnalysis (19)
PEWriter\FullMetadataWriter.cs (1)
462
get { return _rows.
Count
+ 1; }
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
83
public int Count => _list.
Count
;
88
public bool IsEmpty => _list.
Count
== 0;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (3)
35
public readonly int Count => ReadOnlyList.
Count
;
64
if ((uint)index >= (uint)ReadOnlyList.
Count
)
108
if (ReadOnlyList.
Count
!= 0)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (9)
290
return
Count
- 1;
316
SegmentedArray.Copy(list._items, 0, _items, _size, list.
Count
);
379
=> BinarySearch(0,
Count
, item, null);
382
=> BinarySearch(0,
Count
, item, comparer);
737
Count
== 0 ? GetEmptyEnumerator() :
928
SegmentedArray.Copy(list._items, 0, _items, index, list.
Count
);
1186
=> Reverse(0,
Count
);
1218
=> Sort(0,
Count
, null);
1223
=> Sort(0,
Count
, comparer);
Text\SourceText.cs (4)
974
public override int Count => _lineStarts.
Count
;
980
if (index < 0 || index >= _lineStarts.
Count
)
986
if (index == _lineStarts.
Count
- 1)
1012
var limit = Math.Min(_lineStarts.
Count
, lastLineNumber + 4);
Microsoft.CodeAnalysis.UnitTests (83)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (5)
132
Assert.Equal(1, list.
Count
);
134
Assert.Equal(2, list.
Count
);
136
Assert.Equal(4, list.
Count
);
140
Assert.Equal(5, list.
Count
);
142
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)
56
Assert.Equal(expectedItems.
Count
, list.
Count
);
60
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);
356
list.RemoveAt(list.
Count
- 1);
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);
816
index = list.FindLastIndex(list.
Count
- 1, EqualsDelegate);
831
index = list.FindLastIndex(list.
Count
- 1, EqualsDelegate);
832
Assert.Equal(list.
Count
- 1, index); //"Err_29892adewiu Verify second item is duplicated"
836
index = list.FindLastIndex(list.
Count
- 3, EqualsDelegate);
942
index = list.FindLastIndex(list.
Count
- 1, list.
Count
, EqualsDelegate);
943
Assert.Equal(list.
Count
- 1, index); //"Err_3282iahid Verify first item is duplicated"
952
index = list.FindLastIndex(list.
Count
- 1, list.
Count
, EqualsDelegate);
953
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++)
394
list.RemoveAt(list.
Count
- 1);
597
Assert.Equal(0, list.
Count
); //"Should be equal to 0"
599
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
604
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
608
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
615
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
624
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
632
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
634
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
640
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
644
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
652
Assert.Equal(0, list.
Count
); //"Should be equal to 0."
662
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++)
Collections\SegmentedCollectionsMarshalTests.cs (1)
510
Assert.Equal(17, list.
Count
);