Implemented interface members:
5 writes to Count
Microsoft.CodeAnalysis.Workspaces (5)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
306tmp.Count = unsortedNodes.Length; 317ranking.Count = unsortedNodes.Length; 322result.Count = unsortedNodes.Length;
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (1)
290builder.Count = writeIndex;
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
239_builder.Count--;
114 references to Count
Microsoft.CodeAnalysis.Workspaces (114)
Classification\IRemoteSemanticClassificationService.cs (1)
83id = classificationTypes.Count;
Diagnostics\HostDiagnosticAnalyzers.cs (1)
251for (var i = builder.Count - 1; i >= 0; i--)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
138if (buffer.Count == 0)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
359if (uncomputedReferences.Count == 0)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (2)
307for (var i = 0; i < tmp.Count; i++) 318for (var i = 0; i < tmp.Count; i++)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
745var childIndex = unsortedNodes.Count;
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
157var nodeIndex = list.Count;
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (4)
146for (int i = 0, n = builder.Count; i < n; i++) 263var count = declaredSymbolInfos.Count; 274if (declaredSymbolInfos.Count != count && 331var declaredSymbolInfoIndex = declaredSymbolInfos.Count - 1;
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (8)
50filePathToNewDocumentsAndHashes.Count(static kvp => kvp.Value.Count > 1), 55Contract.ThrowIfTrue(newDocumentsAndHashes.Count == 0); 63if (newDocumentsAndHashes.Count == 1) 95Contract.ThrowIfTrue(newDocumentsAndHashes.Count < 2); 109for (int i = 1, n = newDocumentsAndHashes.Count; i < n; i++) 125if (unmergedChanges.Count == 0) 198if (unmergedDocumentChanges.Count != 0) 296if (normalizedChanges.Count == orderedChanges.Length)
PatternMatching\CamelCaseResult.cs (1)
30Debug.Assert(matchedSpansInReverse == null || matchedSpansInReverse.Count == matchCount);
ReassignedVariable\AbstractReassignedVariableService.cs (2)
72while (stack.Count > 0) 301while (stack.Count != 0)
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)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
559if (newModifierTokens.Count == 0) 584for (var i = newModifierTokens.Count - 1; i >= 0; i--)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
146if (nodesToSimplify.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
112for (var i = 0; i < names.Count; i++)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
414if (documentsToChange.Count == 0)
Workspace\Solution\Checksum_Factory.cs (1)
92var checksumsCount = checksums.Count;
Workspace\Solution\SolutionCompilationState.cs (4)
322if (projectInfos.Count == 0) 361if (projectIds.Count == 0) 1382if (documentStates.Count == 0) 1807if (changedDocuments.Count == 0)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
135documentIdToIndex.Add(documentId, documentsToAddOrUpdate.Count); 142documentsToAddOrUpdate.Count == 0 && 176Contract.ThrowIfTrue(generatedSources.Length != documentsToAddOrUpdate.Count);
Workspace\Solution\SolutionState.cs (4)
327if (projectInfos.Count == 0) 332using var _ = ArrayBuilder<ProjectState>.GetInstance(projectInfos.Count, out var projectStates); 375using var _1 = ArrayBuilder<ProjectId>.GetInstance(ProjectIds.Count + projectStates.Count, out var newProjectIdsBuilder); 428if (projectIds.Count == 0)