Implemented interface members:
31 writes to Count
Microsoft.CodeAnalysis (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
646newActiveStatements.Count = oldActiveStatements.Length; 649newExceptionRegions.Count = oldActiveStatements.Length;
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
44builder.Count = index + 1;
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
Microsoft.CodeAnalysis.PooledObjects.Package (3)
ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
Microsoft.CodeAnalysis.Workspaces (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
112_builder.Count = value; 647_builder.Count = limit; 653_builder.Count = count;
System.Collections.Immutable (8)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (8)
245this.Count = 0; 369this.Count += items.Length; 384this.Count += items.Length; 400this.Count += length; 436this.Count += items.Length; 449this.Count += items.Length; 572this.Count--; 1063this.Count += length;
System.Reflection.Metadata (2)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
546stringVirtualIndexToHeapOffsetMap.Count = totalCount;
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (1)
297rowCounts.Count = MetadataTokens.TableCount;
158 references to Count
Aspire.Hosting (1)
Health\ResourceHealthCheckService.cs (1)
166for (var i = 0; i < builder.Count; i++)
Microsoft.CodeAnalysis (23)
CodeGen\LocalScopeManager.cs (13)
261Debug.Assert(scopes.Count > 0); 285Debug.Assert(scopes.Count > 0); 419for (int i = 0, cnt = _nestedScopes.Count; i < cnt; i++) 435for (int i = 0; i < Blocks.Count; i++) 480for (int i = 0; i < Blocks.Count; i++) 524for (int i = 0, cnt = Blocks.Count; i < cnt; i++) 532for (int i = 0, cnt = _nestedScopes.Count; i < cnt; i++) 699Debug.Assert(((_handlers.Count == 0) && (scopeType == ScopeType.Try)) || 700((_handlers.Count > 0) && ((scopeType == ScopeType.Catch) || (scopeType == ScopeType.Filter) || (scopeType == ScopeType.Finally) || (scopeType == ScopeType.Fault)))); 711Debug.Assert(_handlers.Count > 1); 717for (int i = 1; i < _handlers.Count; i++) 749Debug.Assert(_handlers.Count > 1); 847if (handlers.Count != 2 || handlers[1].Type != ScopeType.Finally)
MetadataReference\AssemblyMetadata.cs (1)
352for (int i = _initialModules.Length; i < moduleBuilder.Count; i++)
src\Dependencies\PooledObjects\ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
Microsoft.CodeAnalysis.CodeStyle (12)
src\Dependencies\PooledObjects\ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (2)
45if (builder.Count == 0) 48if (builder.Count == builder.Capacity)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
174Debug.Assert(currentEdgeIndex == edges.Count);
Microsoft.CodeAnalysis.CSharp.Features (1)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
58public bool HasDiagnostics => _diagnostics?.Count > 0;
Microsoft.CodeAnalysis.Features (9)
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
90return Builder.Count == 0;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (6)
792Debug.Assert(oldActiveStatements.Length == newActiveStatements.Count); 793Debug.Assert(oldActiveStatements.Length == newExceptionRegions.Count); 798for (var i = 0; i < newActiveStatements.Count; i++) 952Debug.Assert(oldActiveStatements.IsEmpty || oldActiveStatements.Length == newActiveStatements.Count); 953Debug.Assert(newActiveStatements.Count == newExceptionRegions.Count);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (2)
42if (index >= builder.Count) 164s_diagnosticBaseIndex = builder.Count;
Microsoft.CodeAnalysis.InteractiveHost (9)
src\Dependencies\PooledObjects\ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (1)
92if (builder.Count == 0)
Microsoft.CodeAnalysis.PooledObjects.Package (9)
ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
491for (int i = 1; i < moduleBuilder.Count; i++)
Microsoft.CodeAnalysis.Workspaces (14)
src\Dependencies\PooledObjects\ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (2)
45if (builder.Count == 0) 48if (builder.Count == builder.Capacity)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
174Debug.Assert(currentEdgeIndex == edges.Count);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
299for (var i = 0; i < _documentsAddedInBatch.Count; i++) 360for (var i = 0; i < _documentsAddedInBatch.Count; i++)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Dependencies\PooledObjects\ArrayBuilder.cs (9)
108return _builder.Count; 154while (index > _builder.Count) 159if (index == _builder.Count) 204return _builder.IndexOf(item, 0, _builder.Count, equalityComparer); 269_builder.RemoveAt(_builder.Count - 1); 280for (var j = 0; j < _builder.Count; j++) 321_builder.Sort(startIndex, _builder.Count - startIndex, comparer); 335=> _builder[_builder.Count - 1]; 347return _builder.Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (2)
45if (builder.Count == 0) 48if (builder.Count == builder.Capacity)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
MethodHandlerDetails.cs (1)
92if (builder.Count == 0)
Microsoft.Interop.ComInterfaceGenerator (3)
ComClassInfo.cs (1)
56if (names.Count == 0)
ComInterfaceGenerator.cs (1)
446for (int i = methodList.Count - 1; i > -1; i--)
ComInterfaceInfo.cs (1)
131if (nonFatalDiagnostics.Count != 0)
Microsoft.Interop.SourceGeneration (2)
GeneratedStatements.cs (1)
80if (statementsToUpdate.Count > 0)
SignatureContext.cs (1)
117NativeIndex = typeInfos.Count
System.Collections.Immutable (59)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (56)
113for (int i = value; i < this.Count; i++) 142if (index >= this.Count) 152if (index >= this.Count) 170if (index >= this.Count) 201/// <exception cref="InvalidOperationException">When <see cref="ImmutableArray{T}.Builder.Count"/> doesn't 205if (Capacity != Count) 220/// If <see cref="Capacity"/> equals <see cref="Count"/>, the internal array will be extracted 255Requires.Range(index >= 0 && index <= this.Count, nameof(index)); 256this.EnsureCapacity(this.Count + 1); 258if (index < this.Count) 260Array.Copy(_elements, index, _elements, index + 1, this.Count - index); 274Requires.Range(index >= 0 && index <= this.Count, nameof(index)); 278this.EnsureCapacity(this.Count + count); 280if (index != this.Count) 303Requires.Range(index >= 0 && index <= this.Count, nameof(index)); 310this.EnsureCapacity(this.Count + items.Length); 312if (index != this.Count) 345this.EnsureCapacity(this.Count + count); 368int offset = this.Count; 383int offset = this.Count; 399int offset = this.Count; 435int offset = this.Count; 448int offset = this.Count; 478this.AddRange(items._elements, items.Count); 489this.AddRange(items._elements, items.Count); 565Requires.Range(index >= 0 && index < this.Count, nameof(index)); 567if (index < this.Count - 1) 569Array.Copy(_elements, index + 1, _elements, index, this.Count - index - 1); 599Array.Copy(_elements, index + length, _elements, index, this.Count - index - length); 685if (this.Count == 0) 690T[] result = new T[this.Count]; 691Array.Copy(_elements, result, this.Count); 703Requires.Range(index >= 0 && index + this.Count <= array.Length, nameof(index)); 704Array.Copy(_elements, 0, array, index, this.Count); 714Array.Copy(_elements, 0, destination, 0, this.Count); 728Requires.Range(sourceIndex >= 0 && sourceIndex + length <= this.Count, nameof(sourceIndex)); 766return this.IndexOf(item, startIndex, this.Count - startIndex, EqualityComparer<T>.Default); 799Requires.Range(startIndex >= 0 && startIndex < this.Count, nameof(startIndex)); 800Requires.Range(count >= 0 && startIndex + count <= this.Count, nameof(count)); 833return this.IndexOf(item, startIndex, this.Count - startIndex, equalityComparer); 843if (this.Count == 0) 848return this.LastIndexOf(item, this.Count - 1, this.Count, EqualityComparer<T>.Default); 859if (this.Count == 0 && startIndex == 0) 864Requires.Range(startIndex >= 0 && startIndex < this.Count, nameof(startIndex)); 896Requires.Range(startIndex >= 0 && startIndex < this.Count, nameof(startIndex)); 947if (Count > 1) 949Array.Sort(_elements, 0, this.Count, Comparer<T>.Default); 965if (Count > 1) 987if (Count > 1) 1004Requires.Range(count >= 0 && index + count <= this.Count, nameof(count)); 1018Requires.Range(this.Count <= destination.Length, nameof(destination)); 1019new ReadOnlySpan<T>(_elements, 0, this.Count).CopyTo(destination); 1028for (int i = 0; i < this.Count; i++) 1060this.EnsureCapacity(this.Count + length); 1062int offset = this.Count;
System\Linq\ImmutableArrayExtensions.cs (3)
672return builder[builder.Count - 1]; 682return builder.Any() ? builder[builder.Count - 1] : default; 692return builder.Count > 0;
System.Reflection.Metadata (2)
System\Reflection\Metadata\Internal\NamespaceCache.cs (1)
178Debug.Assert(data.Namespaces!.Count == 0);
System\Reflection\Metadata\TypeName.cs (1)
68: genericTypeArguments.Count == genericTypeArguments.Capacity ? genericTypeArguments.MoveToImmutable() : genericTypeArguments.ToImmutableArray();