Implemented interface members:
1 write to Count
Microsoft.CodeAnalysis.Collections.Package (1)
TemporaryArray`1.cs (1)
239_builder.Count--;
44 references to Count
Microsoft.CodeAnalysis.Collections.Package (44)
Extensions\ImmutableArrayExtensions.cs (4)
832var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 873if (comparer != null && builder.Count > 1) 1189Debug.Assert(builder.Count > 1); 1260Debug.Assert(builder.Count == count);
src\Dependencies\PooledObjects\ArrayBuilder.cs (38)
41var result = new T[_builder.Count]; 87if (Count == 0) 91else if (_builder.Capacity == Count) 146=> Count == 0; 213=> FindIndex(0, this.Count, match); 216=> FindIndex(startIndex, this.Count - startIndex, match); 233=> FindIndex(0, Count, match, arg); 236=> FindIndex(startIndex, Count - startIndex, match, arg); 332if (this.Count <= 1) 357=> Count == 0 ? default : Last(); 374if (Count == 0) 388if (Count == 0) 393var tmp = ArrayBuilder<U>.GetInstance(Count); 417if (Count == 0) 421else if (_builder.Capacity == Count) 470if (this.Count != 0) 491Debug.Assert(builder.Count == 0); 547if (this.Count == 1) 555if (this.Count == 0) 562var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 563for (var i = 0; i < Count; i++) 608Debug.Assert(start + length <= items.Count); 667Debug.Assert(limit <= Count); 679EnsureCapacity(Count + count); 692for (var i = 0; i < Count; i++) 707if (Count <= 1) 717for (int i = 1; i < Count; i++) 731var result = ArrayBuilder<S>.GetInstance(Count); 803switch (Count) 821var builder = ArrayBuilder<TResult>.GetInstance(Count); 841switch (Count) 859var builder = ArrayBuilder<TResult>.GetInstance(Count); 879switch (Count) 897var builder = ArrayBuilder<TResult>.GetInstance(Count); 900builder.Add(map(item, builder.Count, arg)); 916RemoveAt(Count - 1); 922if (Count > 0) 933=> this[Count - 1];
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (1)
34return _index < _builder.Count;
TemporaryArray`1.cs (1)
104public readonly int Count => _builder?.Count ?? _count;