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