Implemented interface members:
8 writes to Count
Microsoft.CodeAnalysis.Features (4)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
320guards.Count = guardCount;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
2424segments.Count = firstSegmentIndex;
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
221commentsAndNewLines.Count--;
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
267flagsBuilder.Count = flagCount;
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
307tmp.Count = unsortedNodes.Length; 318ranking.Count = unsortedNodes.Length; 323result.Count = unsortedNodes.Length;
src\Dependencies\Collections\TemporaryArray`1.cs (1)
242_builder.Count--;
275 references to Count
IdeBenchmarks (2)
Lsp\LspCompletionSerializationBenchmarks.cs (2)
124while (builder.Count < 10000) 132if (builder.Count == 10000)
Microsoft.CodeAnalysis.CSharp.Features (37)
AddImport\CSharpAddImportFeatureService.cs (1)
377if (newImports.Count == 0)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (4)
460rightNames.Clip(rightNames.Count - 1); 468leftNames.Clip(leftNames.Count - 1); 489for (leftIndex = leftNames.Count - 1, rightIndex = rightNames.Count - 1; leftIndex > 0 && rightIndex > 0; leftIndex--, rightIndex--)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
132if (content.Count > 0)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (2)
256if (statements.Count > 0) 271var globalStatements = new FixedSizeArrayBuilder<GlobalStatementSyntax>(statements.Count);
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (1)
101for (var i = 0; i < methodTypeParameters.Count; i++)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (4)
550lines.RemoveAt(lines.Count - 2); 554if (lines.Count == 2) 566for (int i = 1, n = lines.Count - 1; i < n; i++) 644for (int i = 1, n = lines.Count - 1; i < n; i++)
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (5)
258while (lines.Count > 0 && AllWhitespace(lines.First())) 261while (lines.Count > 0 && AllWhitespace(lines.Last())) 262lines.RemoveAt(lines.Count - 1); 264if (lines.Count == 0) 303for (var i = 1; i < lines.Count; i++)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
537while (stack.Count > 0)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (4)
640if (triviaList.Count > 0) 652if (variables.Count == 0 && triviaList.Count > 0) 666if (variables.Count > 0)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
53while (stack.Count > 0)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
180if (matches.Count == 0)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
300if (postMatchesInReverse.Count == 0 &&
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
432while (expressionsToProcess.Count > 0)
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (4)
147for (var i = expressionPieces.Count - 1; i >= 0; i--) 163if (expressionPieces.Count != spreadElements.Count) 194if (spreadElements.Count > 0)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
127if (nodesAndTokens.Count > 0 && nodesAndTokens.Last().GetTrailingTrivia() is [.., (kind: not SyntaxKind.EndOfLineTrivia)]) 150if (nodesAndTokens.Count > 0)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
219var separatorBuilder = ArrayBuilder<SyntaxToken>.GetInstance(builder.Count - 1, Token(leading: default, SyntaxKind.CommaToken, trailing: default));
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
56if (addTrailingComma && nodesAndTokens.Count % 2 == 1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
188if (docCommentsToMove.Count == 0)
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
128for (int i = 0, n = result.Count; i < n; i++)
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
724var baseTypeList = baseTypes.Count > 0 ? SyntaxFactory.BaseList([.. baseTypes]) : null; 1723for (int i = 0, n = list.Count; i < n; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (2)
329for (var i = 0; i < charResults.Count;) 342if (i + 1 < charResults.Count)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
764if (newModifierTokens.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
78if (constraints.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (3)
188if (_statementsBuilder.Count == 0) 202var last = _statementsBuilder.Count - 1; 210if (_statementsBuilder.Count > 1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
804return matchingRefParameters.Count > 0 2326if (elementTypesBuilder.Contains(null) || elementTypesBuilder.Count != arguments.Count)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
BracePairs\AbstractBracePairsTests.cs (1)
40Assert.Equal(expected.Count, bracePairs.Count);
Microsoft.CodeAnalysis.Features (87)
AddImport\AbstractAddImportFeatureService.cs (2)
118if (result.Count > maxResults) 612if (result.Count >= maxResults)
ChangeSignature\AbstractChangeSignatureService.cs (3)
907if (fullList.Count == separators.Count && separators.Count != 0)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (3)
87if (nestedActions.Count != 0) 90var resultCodeAction = nestedActions.Count > 1 128if (nestedActions.Count > 0)
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.cs (1)
92if (analyzerDiagnostics.Count > 0)
CodeFixes\Service\CodeFixService.cs (1)
703return newApplicableDiagnostics.Count == applicableDiagnostics.Length
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningBatchFixAllProvider.cs (1)
53if (pragmaActionsBuilder.Count > 0)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
72if (pragmaActionsBuilder.Count > 0)
CodeRefactorings\CodeRefactoringService.cs (1)
274if (actions.Count == 0)
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (1)
133Debug.Assert(actions.Count != 0, "No code actions found for MoveType Refactoring");
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (1)
314var guardCount = guards.Count;
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
79if (stringLiterals.Length == pieces.Count)
Copilot\CopilotChangeAnalysisUtilities.cs (1)
73for (int i = 1, n = builder.Count; i < n; i++)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (3)
102if (spanBasedAnalyzers.Count == 0 && (!compilerAnalyzerData.HasValue || !compilerAnalyzerData.Value.spanBased)) 146if (analyzers.Count == 0) 158if (analyzers.Count == 0)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
222if (filteredAnalyzers.Count == 0)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (12)
1205lambda.ActiveNodeIndices!.Add(activeNodes.Count); 1616if (lambdaBodyMaps == null || currentLambdaBodyMatch == lambdaBodyMaps.Count) 2269var firstSegmentIndex = segments.Count; 2428if (segments.Count == 0) 2460if (documentLineEdits.Count > 0) 2480if (documentLineEdits.Count > 0 && segment.oldStartLine > previousOldEndLine + 1) 2500if (currentDocumentPath != null && documentLineEdits.Count > 0) 4021indices.Add(builder.Count); 4048if (deletedTypes.TryGetValue((newType.Name, newType.Arity), out var deletedTypeIndices) && deletedTypeIndices.Count > 0) 4756if (changedAttributes.Count == 0) 6155var index = inLambdaCapturesIndex.GetOrAdd(key, inLambdaCaptures.Count); 6156if (index == inLambdaCaptures.Count)
EditAndContinue\DebuggingSession.cs (1)
837Debug.Assert(spans.Count == documentIds.Length);
EditAndContinue\EditSession.cs (1)
896if (edits.Count == mergedEditsBuilder.Count)
EditAndContinue\EmitSolutionUpdateResults.cs (1)
374while (traversalStack.Count > 0)
EditAndContinue\ProjectDifferences.cs (2)
53log.Write($"Found {ChangedOrAddedDocuments.Count} potentially changed, {DeletedDocuments.Count} deleted document(s) in project {newProject.GetLogDisplay()}");
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
103if (items.Count == 0)
EmbeddedLanguages\DateAndTime\EmbeddedCompletionContext.cs (1)
135examples.Count == 1 ? FeaturesResources.Example : FeaturesResources.Examples);
EmbeddedLanguages\RegularExpressions\RegexParser.cs (6)
271if (isConditional && builder.Count >= 3) 292var last = builder.Count == 0 ? null : builder.Last(); 309for (var index = 0; index < list.Count;) 340for (; index < list.Count; index++) 1246if (_currentToken.Kind == RegexKind.CloseBracketToken && builder.Count > 0) 1276var left = ParseSingleCharacterClassComponent(isFirst: components.Count == 0, afterRangeMinus: false);
EmbeddedLanguages\StackFrame\StackFrameParser.cs (1)
397if (builder.Count == 0)
ExtractClass\ExtractClassWithDialogCodeAction.cs (3)
156if (remainingResults.Count == 0) 166using var _3 = ArrayBuilder<ExtractClassMemberAnalysisResult>.GetInstance(remainingResults.Count, out var resultsToRemove); 205Contract.ThrowIfFalse(remainingResults.Count == 0);
ExtractMethod\MethodExtractor.Analyzer.cs (1)
890if (names.Count > 0)
ExtractMethod\MethodExtractor.AnalyzerResult.cs (1)
89if (variables.Count <= 0)
FullyQualify\AbstractFullyQualifyService.cs (1)
106if (fixes.Count == 0)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
89if (missingComparableTypes.Count == 0) 92if (missingComparableTypes.Count == 1)
GenerateType\AbstractGenerateTypeService.cs (1)
223for (var i = 0; i < names.Count; i++)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
219if (!(parameters.Count == 0 && options is { TypeKind: TypeKind.Struct }))
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (1)
116if (listOfPotentiallyValidParametersNodes.Count > 1)
InlineHints\AbstractInlineParameterNameHintsService.cs (4)
70if (buffer.Count > 0) 131if (parameterHints.Count <= 1) 143for (var i = 1; i < parameterHints.Count; i++) 161for (var i = 1; i < parameterHints.Count; i++)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
457if (referencedVariables.Count == localVariables.Count)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
216if (commentsAndNewLines.Count == 0)
MetadataAsSource\AbstractMetadataAsSourceService.DocCommentFormatter.cs (2)
140formattedCommentLinesBuilder.RemoveAt(formattedCommentLinesBuilder.Count - 1); 153if (result.Count > 0)
NavigateTo\AbstractNavigateToSearchService.cs (1)
50if (results.Count > 0)
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (1)
169if (document == null || linkedIndices is null || linkedIndices.Count == 0)
NavigateTo\NavigateToSearcher.cs (1)
403if (nonDuplicates.Count > 0)
QuickInfo\QuickInfoUtilities.cs (1)
131if (usageTextBuilder.Count > 0)
Rename\SymbolicRenameInfo.cs (1)
252if (documentSpans.Count == 0)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (4)
277if (idsBuilder.Count == 0) 460if (analyzersBuilder.Count > 0) 687for (var i = indexOfPragma + incrementOrDecrement; i >= 0 && i < sortedPragmasWithIds.Count; i += incrementOrDecrement) 753if (declarationNodes.Count > 0)
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
179using var _ = ArrayBuilder<(TExpressionSyntax, ITypeSymbol)>.GetInstance(candidates.Count, out var validPotentialConversionTypes);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
69if (actions.Count > 1)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (3)
256Debug.Assert(flagsBuilder.Count == 0); 265if (flagCount < flagsBuilder.Count) 451Debug.Assert(groupBuilder.Count == 0);
Structure\BlockStructureServiceWithProviders.cs (1)
76for (var i = 0; i < context.Spans.Count; i++)
Structure\Syntax\AbstractBlockStructureProvider.cs (1)
37var initialContextCount = context.Spans.Count;
Workspace\CompileTimeSolutionProvider.cs (1)
117if (configIdsToRemove.Count > 0)
Wrapping\ChainedExpression\AbstractChainedExpressionWrapper.cs (4)
180chunks.Add(GetSubRange(pieces, currentChunkStart, end: pieces.Count)); 200for (var i = index; i < pieces.Count; i++) 219=> index < pieces.Count && 225=> index < pieces.Count &&
Microsoft.CodeAnalysis.LanguageServer (1)
Testing\TestDiscoverer.cs (1)
107_logger.LogDebug($"Filtered {discoveredTests.Length} to {matchedTests.Count} tests");
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Extensions\ProtocolConversions.MarkdownContentBuilder.cs (1)
22if (_linesBuilder.Count == 0)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (3)
306if (bulkConfigurationActions.Count > 0) 318if (suppressionSets.Count > 0) 783return actions.Count == 0
Handler\Completion\CompletionHandler.cs (1)
257: matchResultsBuilder.Count > filteredList.Length;
Microsoft.CodeAnalysis.Remote.ServiceHub (8)
Host\AssetProvider.cs (3)
53Contract.ThrowIfTrue(builder.Count != 1); 155if (allProjectChecksums.Count <= 4) 158using var _ = ArrayBuilder<Task>.GetInstance(allProjectChecksums.Count, out var tasks);
Host\RemoteWorkspace.SolutionCreator.cs (1)
271using var _3 = ArrayBuilder<ProjectInfo>.GetInstance(projectStateChecksumsToAdd.Count, out var projectInfos);
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (2)
414var compilationWithAnalyzers = projectAnalyzerBuilder.Count > 0 || hostAnalyzerBuilder.Count > 0
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (2)
193seenClassificationTypes.Add(classificationType, classificationTypes.Count); 198writer.WriteInt32(classificationTypes.Count);
Microsoft.CodeAnalysis.Workspaces (123)
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\BaseTypeFinder.cs (1)
29if (results.Count == 0)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
361if (uncomputedReferences.Count == 0)
FindSymbols\SymbolFinder_Hierarchy.cs (1)
55if (results.Count == 0)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (2)
308for (var i = 0; i < tmp.Count; i++) 319for (var i = 0; i < tmp.Count; i++)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
745var childIndex = unsortedNodes.Count;
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
158var 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)
51filePathToNewDocumentsAndHashes.Count(static kvp => kvp.Value.Count > 1), 56Contract.ThrowIfTrue(newDocumentsAndHashes.Count == 0); 64if (newDocumentsAndHashes.Count == 1) 95Contract.ThrowIfTrue(newDocumentsAndHashes.Count < 2); 109for (int i = 1, n = newDocumentsAndHashes.Count; i < n; i++) 125if (unmergedChanges.Count == 0) 197if (unmergedDocumentChanges.Count != 0) 295if (normalizedChanges.Count == orderedChanges.Length)
PatternMatching\CamelCaseResult.cs (1)
31Debug.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 (1)
18if (builder.Count == 1)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
290internal int Count => (_value as ArrayBuilder<V>)?.Count ?? 1;
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\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
93ThrowIfTrue(_index + values.Count > _values.Length);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
773if (comparer != null && builder.Count > 1) 900Debug.Assert(builder.Count > 1); 971Debug.Assert(builder.Count == count); 1296var result = (builder.Count == array.Length) ? array : builder.ToImmutable();
src\Dependencies\Collections\TemporaryArray`1.cs (1)
107public readonly int Count => _builder?.Count ?? _count;
src\Dependencies\PooledObjects\ArrayBuilder.cs (38)
43var result = new T[_builder.Count]; 89if (Count == 0) 93else if (_builder.Capacity == Count) 148=> Count == 0; 215=> FindIndex(0, this.Count, match); 218=> FindIndex(startIndex, this.Count - startIndex, match); 235=> FindIndex(0, Count, match, arg); 238=> FindIndex(startIndex, Count - startIndex, match, arg); 334if (this.Count <= 1) 359=> Count == 0 ? default : Last(); 376if (Count == 0) 390if (Count == 0) 395var tmp = ArrayBuilder<U>.GetInstance(Count); 419if (Count == 0) 423else if (_builder.Capacity == Count) 472if (this.Count != 0) 493Debug.Assert(builder.Count == 0); 549if (this.Count == 1) 557if (this.Count == 0) 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 565for (var i = 0; i < Count; i++) 610Debug.Assert(start + length <= items.Count); 669Debug.Assert(limit <= Count); 681EnsureCapacity(Count + count); 694for (var i = 0; i < Count; i++) 709if (Count <= 1) 719for (int i = 1; i < Count; i++) 733var result = ArrayBuilder<S>.GetInstance(Count); 805switch (Count) 823var builder = ArrayBuilder<TResult>.GetInstance(Count); 843switch (Count) 861var builder = ArrayBuilder<TResult>.GetInstance(Count); 881switch (Count) 899var builder = ArrayBuilder<TResult>.GetInstance(Count); 902builder.Add(map(item, builder.Count, arg)); 918RemoveAt(Count - 1); 924if (Count > 0) 935=> this[Count - 1];
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (1)
36return _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)
59Debug.Assert(unreachableBlocksToVisit.Count == 0); 102for (index = 0; index < unreachableBlocksToVisit.Count; index++) 197while (toVisit.Count != 0 || unreachableBlocksToVisit.Count != 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
157if (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)
636for (var i = lineBreaks.Count - 1; i >= 0; i--) 646changes.Count == 0) 652for (var i = changes.Count - 1; i >= 0; i--) 662for (var i = changes.Count - 1; i >= 0; i--) 681if (changes.Count == 0) 717for (var i = 0; i < changes.Count; i++) 735changes.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
224if (violations.Count > 0) 280if (violations.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
247if (symbols.Builder.Count == 0) 252else if (symbols.Builder.Count == 1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.EventSymbolKey.cs (1)
42for (var i = 0; i < events.Builder.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PooledArrayBuilder.cs (1)
21public int Count => Builder.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (3)
81if (builders.Count == 0) 86if (builders.Count == 1) 91var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
558if (newModifierTokens.Count == 0) 583for (var i = newModifierTokens.Count - 1; i >= 0; i--)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
150if (nodesToSimplify.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
203if (accessors.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
125for (var i = indexPath.Count - 1; i >= 0; i--)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
112for (var i = 0; i < names.Count; i++)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
426if (documentsToChange.Count == 0)
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
708if (peReferencesRemoved.Count > 0) 732if (peReferencesAdded.Count > 0)
Workspace\Solution\Checksum_Factory.cs (1)
122var checksumsCount = checksums.Count;
Workspace\Solution\SolutionCompilationState.cs (4)
322if (projectInfos.Count == 0) 361if (projectIds.Count == 0) 1582for (var i = 0; i < newSortedProjectStatesBuilder.Count; i++) 1908if (changedDocuments.Count == 0)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
137documentIdToIndex.Add(documentId, documentsToAddOrUpdate.Count); 144documentsToAddOrUpdate.Count == 0 && 178Contract.ThrowIfTrue(generatedSources.Length != documentsToAddOrUpdate.Count);
Workspace\Solution\SolutionState.cs (5)
361if (projectInfos.Count == 0) 366using var _ = ArrayBuilder<ProjectState>.GetInstance(projectInfos.Count, out var projectStates); 409using var _1 = ArrayBuilder<ProjectId>.GetInstance(ProjectIds.Count + projectStates.Count, out var newProjectIdsBuilder); 411using var _3 = ArrayBuilder<ProjectState>.GetInstance(SortedProjectStates.Length + projectStates.Count, out var newSortedProjectStatesBuilder); 466if (projectIds.Count == 0)