Implemented interface members:
2 writes to Count
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (1)
290builder.Count = writeIndex;
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
239_builder.Count--;
49 references to Count
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (49)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (11)
73switch (items.Count) 91var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 113switch (items.Count) 131var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 153switch (items.Count) 171var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 174builder.Add(map(item, builder.Count, arg)); 201builder.RemoveAt(builder.Count - 1); 207if (builder.Count > 0) 219return builder[builder.Count - 1]; 278for (var i = 0; i < builder.Count; i++)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
762var result = (builder.Count == array.Length) ? array : builder.ToImmutable(); 802if (comparer != null && builder.Count > 1) 1118Debug.Assert(builder.Count > 1); 1189Debug.Assert(builder.Count == count);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
104public readonly int Count => _builder?.Count ?? _count;
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
865else if (resolvedParts.Count > 0)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (1)
42int end = sortedFields.Count;
src\Compilers\Core\Portable\InternalUtilities\SetWithInsertionOrder.cs (1)
85public int Count => _elements?.Count ?? 0;
src\Dependencies\PooledObjects\ArrayBuilder.cs (28)
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); 313if (this.Count <= 1) 338=> Count == 0 ? default : Last(); 355if (Count == 0) 369if (Count == 0) 374var tmp = ArrayBuilder<U>.GetInstance(Count); 398if (Count == 0) 402else if (_builder.Capacity == Count) 442if (this.Count != 0) 463Debug.Assert(builder.Count == 0); 519if (this.Count == 1) 527if (this.Count == 0) 534var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 535for (var i = 0; i < Count; i++) 580Debug.Assert(start + length <= items.Count); 646Debug.Assert(limit <= Count); 658EnsureCapacity(Count + count); 671for (var i = 0; i < Count; i++) 686if (Count <= 1) 694for (int i = 1; i < Count; i++) 708var result = ArrayBuilder<S>.GetInstance(Count);
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (1)
34return _index < _builder.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (1)
73Contract.ThrowIfTrue(_index + values.Count > _values.Length);