Implemented interface members:
2 writes to Count
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (1)
290builder.Count = writeIndex;
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
239_builder.Count--;
77 references to Count
Microsoft.CodeAnalysis.CodeStyle (77)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
277if (idsBuilder.Count == 0) 460if (analyzersBuilder.Count > 0) 687for (var i = indexOfPragma + incrementOrDecrement; i >= 0 && i < sortedPragmasWithIds.Count; i += incrementOrDecrement)
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\OrderPreservingMultiDictionary.cs (1)
290internal int Count => (_value as ArrayBuilder<V>)?.Count ?? 1;
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\SetWithInsertionOrder.cs (1)
85public int Count => _elements?.Count ?? 0;
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
385if (builder.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\Extensions\ListExtensions.cs (2)
69for (var sourceIndex = 0; sourceIndex < list.Count; sourceIndex++) 78list.RemoveRange(targetIndex, list.Count - targetIndex);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
256while (commonAncestorsStack.Count > 0 && 263if (commonAncestorsStack.Count == 0) 278return commonAncestorsStack.Count == 0 ? null : commonAncestorsStack.Peek();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
60Debug.Assert(unreachableBlocksToVisit.Count == 0); 103for (index = 0; index < unreachableBlocksToVisit.Count; index++) 198while (toVisit.Count != 0 || unreachableBlocksToVisit.Count != 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
158if (buffer.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (1)
205Debug.Assert(scratch.Count == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (7)
637for (var i = lineBreaks.Count - 1; i >= 0; i--) 647changes.Count == 0) 653for (var i = changes.Count - 1; i >= 0; i--) 663for (var i = changes.Count - 1; i >= 0; i--) 682if (changes.Count == 0) 718for (var i = 0; i < changes.Count; i++) 736changes.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
223if (violations.Count > 0) 279if (violations.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PooledArrayBuilder.cs (1)
21public int Count => Builder.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (1)
73Contract.ThrowIfTrue(_index + values.Count > _values.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
70if (builders.Count == 0) 75if (builders.Count == 1) 80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count)); 101switch (builder.Count)