Implemented interface members:
property
Count
System.Collections.Generic.IReadOnlyCollection<T>.Count
property
Count
System.Collections.ICollection.Count
408 references to Count
DesignSurfaceExt (4)
UndoEngineExt.cs (4)
17get { return _undoStack.Count > 0; } 22get { return _redoStack.Count > 0; } 27if (_undoStack.Count > 0) 49if (_redoStack.Count > 0)
dotnet-svcutil-lib (16)
FrameworkFork\Microsoft.Xml\Xml\schema\ContentValidator.cs (4)
500if (nodeStack.Count == 0) 578if (contextStack.Count == 0) 661if (nodeStack.Count == 0) 745if (nodeStack.Count == 0)
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (1)
1119if (localFrames.Count > 0)
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\precedingsibling.cs (1)
57while (inputStk.Count != 0)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InternalBufferManager.cs (2)
487if (_items.Count > 0) 500if (_items.Count < this.Limit)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\SynchronizedPool.cs (6)
366while (_items.Count > value) 387if (_items.Count == _maxCount) 397if (_items.Count > 0) 401if (_items.Count > 0) 412if (_items.Count < this.MaxCount) 416if (_items.Count < this.MaxCount)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (2)
383if (resolveCallState.StackedRetrievers.Count > 0) 1190if (_resolveCallState.StackedRetrievers.Count > 0)
illink (17)
ILLink.Tasks (4)
CreateRuntimeRootDescriptorFile.cs (4)
520 if (activeSections.Count > 0 && activeSections.Peek () != true) { 539 if (activeSections.Count == 0) { 553 if (activeSections.Count == 0) 565 get => activeSections.Count == 0 || activeSections.Peek () == true;
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\ConnectionCompletion.cs (1)
14if (onCompleted == null || onCompleted.Count == 0)
src\Servers\Kestrel\shared\test\DisposableStack.cs (1)
14while (Count > 0)
Microsoft.AspNetCore.App.Analyzers.Test (8)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (8)
90(spanStartStack.Count > 0 || namedSpanStartStack.Count > 0) && 100if (matches[0].name == SpanStartString && matches[1].name == SpanEndString && spanStartStack.Count > 0 || 101matches[0].name == SpanStartString && matches[1].name == NamedSpanEndString && namedSpanStartStack.Count > 0) 135if (spanStartStack.Count == 0) 149if (namedSpanStartStack.Count == 0) 162if (spanStartStack.Count > 0) 167if (namedSpanStartStack.Count > 0)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTestFixture.cs (1)
119while (_disposables.Count > 0)
Microsoft.AspNetCore.Components (3)
Rendering\RenderTreeBuilder.cs (2)
733=> _openElementIndices.Count == 0 ? (int?)null : _openElementIndices.Peek(); 778if (_openElementIndices.Count > 0)
src\Http\Routing\src\Tree\TreeEnumerator.cs (1)
40while (_stack.Count > 0)
Microsoft.AspNetCore.Components.Server (3)
BlazorPack\SequenceOfT.cs (1)
232var segment = this.segmentPool.Count > 0 ? this.segmentPool.Pop() : new SequenceSegment();
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequencePool.cs (2)
91if (this.pool.Count > 0) 107if (this.pool.Count < this.maxSize)
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\DefaultModelBindingContext.cs (1)
284if (_stack.Count >= MaxModelBindingRecursionDepth)
Microsoft.AspNetCore.Mvc.Razor (2)
RazorPageBase.cs (2)
241if (TagHelperScopes.Count == 0) 686if (TagHelperScopes.Count > 0)
Microsoft.AspNetCore.Routing (1)
Tree\TreeEnumerator.cs (1)
40while (_stack.Count > 0)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Internal\Http\HttpProtocol.cs (4)
689if (!HasResponseStarted && _applicationException == null && _onStarting?.Count > 0) 762if (_onCompleted?.Count > 0) 808if (onStarting?.Count > 0) 836if (onCompleted?.Count > 0)
Internal\Infrastructure\KestrelConnection.cs (1)
99if (onCompleted == null || onCompleted.Count == 0)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
src\Servers\Kestrel\shared\test\DisposableStack.cs (1)
14while (Count > 0)
src\Shared\test\Shared.Tests\runtime\Http2\DynamicTableTest.cs (2)
123byte[] data = Encoding.ASCII.GetBytes($"header-{insertedHeaders.Count}"); 132Assert.True(table.Count < insertedHeaders.Count);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\ConnectionCompletion.cs (1)
14if (onCompleted == null || onCompleted.Count == 0)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Servers\Kestrel\shared\ConnectionCompletion.cs (1)
14if (onCompleted == null || onCompleted.Count == 0)
Microsoft.AspNetCore.Shared.Tests (2)
runtime\Http2\DynamicTableTest.cs (2)
123byte[] data = Encoding.ASCII.GetBytes($"header-{insertedHeaders.Count}"); 132Assert.True(table.Count < insertedHeaders.Count);
Microsoft.AspNetCore.SignalR.Client.Core (2)
src\SignalR\common\Shared\MessageBuffer.cs (2)
339if (pool.Count != 0) 396if (pool.Count < PoolLimit)
Microsoft.AspNetCore.SignalR.Core (2)
src\SignalR\common\Shared\MessageBuffer.cs (2)
339if (pool.Count != 0) 396if (pool.Count < PoolLimit)
Microsoft.Build (15)
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
797while (_legacyCallTargetScopes.Count != 0)
BackEnd\Components\Scheduler\SchedulableRequest.cs (1)
529while (requestsToEvaluate.Count > 0)
BackEnd\Components\Scheduler\Scheduler.cs (2)
1796if (requestsToAdd.Count == 0) 1807while (requestsToAdd.Count > 0)
BackEnd\Components\Scheduler\SchedulingPlan.cs (2)
345pathsByLength.Sort(delegate (Stack<PlanConfigData> left, Stack<PlanConfigData> right) { return Comparer<int>.Default.Compare(left.Count, right.Count); });
Evaluation\Expander.cs (1)
1789if (transformFunctionStack.Count > 0)
Evaluation\LazyItemEvaluator.cs (2)
368while (itemListStack.Count > 0) 425currentGlobsToIgnore = globsToIgnoreStack.Count == 0 ? globsToIgnore : globsToIgnoreStack.Peek();
Evaluation\Profiler\EvaluationProfiler.cs (4)
25private EvaluationLocation CurrentLocation => _evaluationStack.Count == 0 ? EvaluationLocation.EmptyLocation : _evaluationStack.Peek().Location; 88return _evaluationStack.Count == 0; 117if (_evaluationProfiler._evaluationStack.Count > 0) 138if (_evaluationProfiler._evaluationStack.Count > 0)
Logging\SerialConsoleLogger.cs (2)
957return _frames.Count; 966return _frames.Count == 0;
Microsoft.Build.Tasks.Core (1)
ParserState.cs (1)
88if (_namespaceStack.Count == 0)
Microsoft.Cci.Extensions (1)
Traversers\DependencyTraverser.cs (1)
193Contract.Assert(_definitionStack.Count != 0);
Microsoft.CodeAnalysis (18)
Collections\KeyedStack.cs (1)
35if (_dict.TryGetValue(key, out store) && store.Count > 0)
Collections\Rope.cs (3)
132while (stack.Count != 0) 163while (stack.Count != 0 && rem > 0) 187while (stack.Count != 0)
Collections\SmallDictionary.cs (3)
551if (_stack == null || _stack.Count == 0) 668if (_stack == null || _stack.Count == 0) 774if (_stack == null || _stack.Count == 0)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
245while (nodeStack.Count > 0)
Syntax\SyntaxDiffer.cs (7)
126if (_newNodes.Count == 0) 129if (_oldNodes.Count > 0) 131RecordDeleteOld(_oldNodes.Count); 135else if (_oldNodes.Count == 0) 138if (_newNodes.Count > 0) 140RecordInsertNew(_newNodes.Count); 568int start = _oldNodes.Count > 0 ? _oldNodes.Peek().Position : _oldSpan.End;
Syntax\SyntaxNavigator.cs (2)
102while (stack.Count > 0) 148while (stack.Count > 0)
TreeDumper.cs (1)
262while (stack.Count != 0)
Microsoft.CodeAnalysis.CodeStyle (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.NodeEnumerator.cs (2)
68if (!_currentNodeHasValue && _stack.Count <= 0) 79Contract.ThrowIfTrue(_stack.Count == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
17if (stack.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
888if (regionStack.Count > 0) 899if (ifStack.Count > 0) 905while (regionStack.Count > 0) 908while (ifStack.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (2)
91while (spineNodes.Count > 0) 141if (spineNodes.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
240var count = stack.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
433Contract.ThrowIfTrue(_contextualSymbolStack.Count == 0); 439=> _contextualSymbolStack.Count == 0 ? null : _contextualSymbolStack.Peek();
Microsoft.CodeAnalysis.CSharp (9)
Compilation\SyntaxAndDeclarationManager.cs (1)
644while (stack.Count > 0);
Compiler\DocumentationCommentCompiler.cs (3)
1259if (_temporaryStringBuilders != null && _temporaryStringBuilders.Count > 0) 1272if (_temporaryStringBuilders?.Count > 0) 1287if (_temporaryStringBuilders?.Count > 0)
Declarations\DeclarationTable.cs (2)
219while (stack.Count > 0) 324while (stack.Count > 0)
Emitter\Model\PEModuleBuilder.cs (2)
345while (namespacesAndTypesToProcess.Count > 0) 564while (namespacesToProcess.Count > 0)
Symbols\TypeParameterSymbolExtensions.cs (1)
37if (stack is null || stack.Count == 0)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\AnonymousTypesSemanticsTests.cs (1)
2056while (stack.Count > 0)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParsingTests.cs (1)
266while (stack.Count > 0)
Microsoft.CodeAnalysis.EditorFeatures (2)
InlineRename\AbstractInlineRenameUndoManager.cs (2)
149if (this.UndoStack.Count > 0) 163if (this.RedoStack.Count > 0)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Extensions\CollectionExtensionsTest.cs (3)
24Assert.Equal(0, stack.Count); 32Assert.Equal(0, stack.Count); 44Assert.Equal(0, stack.Count);
Microsoft.CodeAnalysis.Test.Utilities (7)
Assert\AssertXml.cs (1)
157while (stack.Count > 0)
MarkedSource\MarkupTestFile.cs (6)
92(spanStartStack.Count > 0 || namedSpanStartStack.Count > 0) && 137if (spanStartStack.Count == 0) 151if (namedSpanStartStack.Count == 0) 164if (spanStartStack.Count > 0) 169if (namedSpanStartStack.Count > 0)
Microsoft.CodeAnalysis.VisualBasic (3)
Compilation\DocumentationComments\DocWriter.vb (3)
60If Me._temporaryStringBuilders IsNot Nothing AndAlso Me._temporaryStringBuilders.Count > 0 Then 74If Me._temporaryStringBuilders IsNot Nothing AndAlso Me._temporaryStringBuilders.Count > 0 Then 87If Me._temporaryStringBuilders IsNot Nothing AndAlso Me._temporaryStringBuilders.Count > 0 Then
Microsoft.CodeAnalysis.Workspaces (22)
Classification\SyntaxClassification\SyntacticChangeRangeComputer.cs (8)
128while (oldStack.Count > 0 && newStack.Count > 0) 160if (oldStack.Count > 0) 164if (newStack.Count > 0) 183while (oldStack.Count > 0 && newStack.Count > 0) 228if (oldStack.Count > 0) 232if (newStack.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.NodeEnumerator.cs (2)
68if (!_currentNodeHasValue && _stack.Count <= 0) 79Contract.ThrowIfTrue(_stack.Count == 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
17if (stack.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
888if (regionStack.Count > 0) 899if (ifStack.Count > 0) 905while (regionStack.Count > 0) 908while (ifStack.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (2)
91while (spineNodes.Count > 0) 141if (spineNodes.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
240var count = stack.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
433Contract.ThrowIfTrue(_contextualSymbolStack.Count == 0); 439=> _contextualSymbolStack.Count == 0 ? null : _contextualSymbolStack.Peek();
Storage\SQLite\v2\SQLitePersistentStorage_Helpers.cs (2)
96if (s_byteArrayPool.Count > 0) 114if (s_byteArrayPool.Count < MaxPooledByteArrays)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
240var count = stack.Count;
Microsoft.DotNet.AsmDiff (1)
DiffEngine.cs (1)
216for (var i = braceDelta; i < 0 && startLineStack.Count > 0; i++)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Modeler\ServiceClientModelFactory.cs (4)
56private string CurrentMethodName => _methodNameStack.Value.Count != 0 ? _methodNameStack.Value.Peek() : null; 58private string CurrentParameterName => _parameterNameStack.Value.Count != 0 ? _parameterNameStack.Value.Peek() : "Value"; 60private string CurrentTypeName => _typeNameStack.Value.Count != 0 ? _typeNameStack.Value.Peek() : null; 62private string CurrentPropertyName => _propertyNameStack.Value.Count != 0 ? _propertyNameStack.Value.Peek() : "Value";
Microsoft.DotNet.VersionTools (5)
BuildManifest\VersionIdentifier.cs (5)
129if ((majorMinorPatchStack.Count == 0 && isNumber) || 130(majorMinorPatchStack.Count > 0 && prevDelimiterCharacter == '.' && isNumber)) 135else if (majorMinorPatchStack.Count > 0 && majorMinorPatchStack.Count < 3 && 142if (majorMinorPatchStack.Count >= 3 && (prevDelimiterCharacter != '.' || !isNumber || nextDelimiterIndex == -1))
Microsoft.Extensions.Configuration (1)
ConfigurationSectionDebugView.cs (1)
50while (stack.Count > 0)
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
59while (stack.Count > 0)
Microsoft.Extensions.Configuration.Json (3)
JsonConfigurationFileParser.cs (3)
75if (isEmpty && _paths.Count > 0) 83Debug.Assert(_paths.Count > 0); 114_paths.Push(_paths.Count > 0 ?
Microsoft.Extensions.Configuration.Xml (3)
XmlStreamConfigurationProvider.cs (3)
65if (currentPath.Count == 0) 129if (currentPath.Count != 0) 147if (currentPath.Count != 0)
Microsoft.Extensions.FileSystemGlobbing (1)
Internal\PatternContexts\PatternContext.cs (1)
36return _stack.Count == 0;
Microsoft.Extensions.SecretManager.Tools.Tests (1)
UserSecretsTestFixture.cs (1)
24while (_disposables.Count > 0)
Microsoft.Gen.Logging (2)
Emission\StringBuilderPool.cs (1)
17if (_builders.Count == 0)
src\Generators\Shared\StringBuilderPool.cs (1)
22if (_builders.Count == 0)
Microsoft.Gen.Metrics (1)
src\Generators\Shared\StringBuilderPool.cs (1)
22if (_builders.Count == 0)
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\StringBuilderPool.cs (1)
22if (_builders.Count == 0)
Microsoft.Interop.SourceGeneration (3)
ManualTypeMarshallingHelper.cs (1)
385while (typeStack.Count > 0)
TypeSymbolExtensions.cs (2)
238while (originalNestedTypes.Count > 0) 318while (genericTypesToSubstitute.Count != 0)
Microsoft.ML.Core (1)
Utilities\Utils.cs (1)
93return x == null ? 0 : x.Count;
Microsoft.ML.Data (11)
Prediction\Calibrator.cs (10)
1887ch.Assert(stack.Count == 0 || di.Score >= top.MaxX); 1889for (; stack.Count > 0 && ((top.MaxX >= curr.MinX) || curr.Value <= top.Value);) 1894if (stack.Count > 0) 1897ch.Assert(stack.Count == 0 || top.MaxX < curr.MinX); 1902ch.Info("PAV calibrator: piecewise function approximation has {0} components.", stack.Count); 1903float[] mins = new float[stack.Count]; 1904float[] maxes = new float[stack.Count]; 1905float[] values = new float[stack.Count]; 1907for (int i = stack.Count - 1; stack.Count > 0; --i)
Utilities\StreamUtils.cs (1)
95while (dirsLeft.Count != 0)
Microsoft.ML.TorchSharp (1)
AutoFormerV2\ObjectDetectionMetrics.cs (1)
275while (prStack.Count > 0)
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\Legacy\AbstractLegacyProject_IProjectSiteEx.cs (1)
25Contract.ThrowIfFalse(_batchScopes.Count > 0);
PresentationBuildTasks (3)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (2)
1056if (bracketCharacterStack.Count == 0) 1094if (bracketCharacterStack.Count != 0)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleModeStack.cs (1)
44get { return _stack.Count - 1; }
PresentationCore (11)
MS\Internal\TextFormatting\TextStore.cs (1)
2713while (directionalEmbeddingStack.Count > 0)
System\Windows\EventRoute.cs (3)
334if (_branchNodeStack is { Count: > 0 } stack) 361if (_branchNodeStack is { Count: > 0 } stack) 388if (_branchNodeStack is { Count: > 0 } stack)
System\Windows\Media\BoundsDrawingContextWalker.cs (3)
517Debug.Assert(_pushTypeStack.Count > 0); 527Debug.Assert(_transformStack.Count > 0); 538(_clipStack.Count > 0))
System\Windows\Media\DrawingDrawingContext.cs (2)
1064(_previousDrawingGroupStack.Count == 0)) 1164int stackCount = _previousDrawingGroupStack.Count;
System\Windows\Media\HitTestWithPointDrawingContextWalker.cs (1)
347Debug.Assert(_pointStack.Count > 0);
System\Windows\Media3D\Viewport2DVisual3D.cs (1)
484while (materialStack.Count > 0)
PresentationFramework (31)
MS\Internal\Data\LiveShapingBlock.cs (2)
319while (stack.Count > 0) 400while (stack.Count > 0)
MS\Internal\Globalization\BamlResourceDeserializer.cs (4)
71while (_bamlTreeStack.Count > 0 && _reader.Read()) 301if (_reader.Read() || _bamlTreeStack.Count > 0) 347if (_bamlTreeStack.Count > 0) 388if (stackForProperty.Count > 0)
MS\Internal\Globalization\BamlResourceSerializer.cs (1)
69while (_bamlTreeStack.Count > 0)
MS\Internal\Ink\EditingCoordinator.cs (3)
317Debug.Assert(_activationStack.Count == 1, "The behavior stack has to contain one behavior."); 1249Debug.Assert(_activationStack.Count <= 1, "The behavior stack has to contain at most one behavior when user is not editing."); 1319if ( _activationStack.Count > 0 )
System\Windows\Application.cs (2)
582if (s_NestedBamlLoadInfo.Count == 0) 2424if (s_NestedBamlLoadInfo != null && s_NestedBamlLoadInfo.Count > 0)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
827DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Controls\InkCanvas.cs (1)
292while ( transforms.Count > 0 )
System\Windows\Controls\SinglePageViewer.cs (1)
805DependencyObject branchNode = (branchNodeStack.Count > 0) ? branchNodeStack.Peek() : null;
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (1)
369if (_lookupResultStack.Count > 0)
System\Windows\Documents\TextRangeBase.cs (3)
816if (listItemCounter != null && listItemCounter.Count > 0) 837if (listItemCounter.Count == 0) 844Invariant.Assert(listItemCounter.Count > 0, "expectinng listItemCounter.Count > 0");
System\Windows\Documents\TextStore.cs (3)
4939if (IMECompositionTraceOp.FirstEndOp <= op && _opStack.Count > 0) 4954IMECompositionTraceRecord record = new IMECompositionTraceRecord(op, _opStack.Count, charCount, imeCharCount, eventState, BuildDetail(args)); 4969_traceList.Flush(_opStack.Count); // flush when reaching depth 0
System\Windows\Documents\XPSS0ValidatingLoader.cs (1)
106Hashtable validResources = (_validResources.Count > 0 ? _validResources.Peek() : null);
System\Windows\FrameworkContentElement.cs (1)
1412DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\FrameworkElement.cs (1)
3120DependencyObject branchNode = branchNodeStack.Count > 0 ? branchNodeStack.Peek() : null;
System\Windows\Markup\BamlReader.cs (3)
1200_deferableContentBlockDepth = _nodeStack.Count; 1981if (_deferableContentBlockDepth == _nodeStack.Count) 2019if (_deferableContentBlockDepth == _nodeStack.Count)
System\Windows\Markup\MarkupExtensionParser.cs (2)
1056if (bracketCharacterStack.Count == 0) 1094if (bracketCharacterStack.Count != 0)
System\Windows\Markup\StyleModeStack.cs (1)
44get { return _stack.Count - 1; }
ReachFramework (2)
Serialization\Manager\ReachVisualSerializer.cs (1)
116while (contextStack.Count > 0)
Serialization\Manager\ReachVisualSerializerAsync.cs (1)
155if(context.ContextStack.Count > 0)
RunTests (2)
TestRunner.cs (2)
382while (running.Count < max && waiting.Count > 0) 390ConsoleUtil.Write($" {running.Count,2} running, {waiting.Count,2} queued, {completed.Count,2} completed");
Stress.ApiService (1)
TraceCreator.cs (1)
59while (activityStack.Count > 0)
System.CodeDom (1)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
223while (subTypeNames.Count > 0)
System.Collections (4)
System\Collections\Generic\SortedSet.cs (2)
203while (stack.Count != 0) 1906if (_stack.Count == 0)
System\Collections\Generic\SortedSet.TreeSubSet.cs (1)
215while (stack.Count != 0)
System\Collections\Generic\Stack.cs (1)
160Count == 0 ? EnumerableHelpers.GetEmptyEnumerator<T>() :
System.Collections.Immutable (8)
System\Collections\Immutable\AllocFreeConcurrentStack.cs (2)
31if (localStack.Count < MaxSize) 44if (localStack != null && localStack.Count > 0)
System\Collections\Immutable\ImmutableExtensions.cs (2)
66/// in particular around inlining. <see cref="Stack{T}.Count"/> typically gets inlined by today's JIT, while 73if (stack.Count > 0)
System\Collections\Immutable\ImmutableList_1.Enumerator.cs (1)
169if (_remainingCount > 0 && stack.Count > 0)
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (1)
144if (stack.Count > 0)
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (1)
152if (stack.Count > 0)
System\Collections\Immutable\SortedInt32KeyNode.Enumerator.cs (1)
129if (stack.Count > 0)
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
424if (_recursionStateStack.Count >= MaximumNumberOfCompositionIterations)
System.Composition.Hosting (1)
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
117if (dependencies.Count == 0 || dependencies.Peek() == null)
System.Console (8)
System\IO\StdInReader.cs (8)
151Debug.Assert(_tmpKeys.Count == 0); 152Debug.Assert(consumeKeys || _availableKeys.Count == 0); 156bool freshKeys = _availableKeys.Count == 0; 271while (_tmpKeys.Count > 0) 285if (_availableKeys.Count == 0) 291if (_availableKeys.Count > 0) 323if (_availableKeys.Count > 0) 340Debug.Assert(_availableKeys.Count == 0);
System.Data.Common (4)
System\Data\XmlDataLoader.cs (4)
711int entryChild = _childRowsStack!.Count; // Memorize child stack level on entry 843while (entryChild < _childRowsStack.Count) 882int entryChild = _childRowsStack!.Count; // Memorize child stack level on entry 1114while (entryChild < _childRowsStack.Count)
System.Formats.Asn1 (7)
System\Formats\Asn1\AsnDecoder.BitString.cs (2)
521if (readerStack?.Count > 0) 570if (readerStack?.Count > 0)
System\Formats\Asn1\AsnDecoder.OctetString.cs (2)
386if (readerStack?.Count > 0) 435if (readerStack?.Count > 0)
System\Formats\Asn1\AsnWriter.cs (3)
114if ((_nestingStack?.Count ?? 0) != 0) 139if ((_nestingStack?.Count ?? 0) != 0) 197if ((_nestingStack?.Count ?? 0) != 0)
System.Formats.Cbor (4)
System\Formats\Cbor\Reader\CborReader.cs (2)
44public int CurrentDepth => _nestedDataItems is null ? 0 : _nestedDataItems.Count; 207Debug.Assert(_nestedDataItems?.Count > 0);
System\Formats\Cbor\Writer\CborWriter.cs (2)
49public int CurrentDepth => _nestedDataItems is null ? 0 : _nestedDataItems.Count; 303Debug.Assert(_nestedDataItems?.Count > 0); // implied by previous check
System.Formats.Nrbf (1)
System\Formats\Nrbf\NrbfDecoder.cs (1)
174while (readStack.Count > 0)
System.Linq.Expressions (8)
System\Dynamic\BindingRestrictions.cs (4)
165while (_tests.Count > 0) 174while (_tests.Count > 0 && _tests.Peek().Depth == depth) 224if (stack.Count == 0) 377if (stack.Count == 0)
System\Linq\Expressions\Compiler\StackSpiller.Temps.cs (4)
178internal int Mark() => _usedTemps?.Count ?? 0; 190Debug.Assert(_usedTemps == null || mark <= _usedTemps.Count); 196while (mark < _usedTemps.Count) 211Debug.Assert(_usedTemps == null || _usedTemps.Count == 0);
System.Private.CoreLib.Generators (2)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (2)
403while (symbolsToExamine.Count > 0) 431while (symbolsToExamine.Count > 0)
System.Private.DataContractSerialization (1)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
223while (subTypeNames.Count > 0)
System.Private.Windows.Core (1)
System\Private\Windows\Core\BinaryFormat\Deserializer\Deserializer.cs (1)
188while (_parserStack.Count > 0)
System.Private.Xml (25)
System\Xml\Schema\ContentValidator.cs (7)
455if (nodeStack.Count == 0) 531if (contextStack.Count == 0) 587if (nodeStack.Count == 0) 670if (nodeStack.Count == 0) 1097if (_stack.Count == 0) 1142if (_stack!.Count > 0) 1205if (_stack!.Count > 0)
System\Xml\Schema\DtdParser.cs (1)
1107if (localFrames.Count > 0)
System\Xml\Schema\DtdParserAsync.cs (1)
738if (localFrames.Count > 0)
System\Xml\Schema\SchemaCollectionCompiler.cs (1)
249while (_complexTypeStack.Count > 0)
System\Xml\Schema\SchemaSetCompiler.cs (1)
245while (_complexTypeStack.Count > 0)
System\Xml\Serialization\CodeGenerator.cs (6)
1282_initElseIfStack = _blockStack.Count; 1291_initIfStack = _blockStack!.Count; 1296if (_initIfStack == _blockStack!.Count) 1302if (_initElseIfStack == _blockStack.Count) 1317if (_initIfStack == _blockStack!.Count) 1323if (_initElseIfStack == _blockStack.Count)
System\Xml\XPath\Internal\PreSiblingQuery.cs (1)
54while (inputStk.Count != 0)
System\Xml\Xsl\XPath\XPathParser.cs (1)
57Debug.Assert(_posInfo.Count == 0, "PushPosInfo() and PopPosInfo() calls have been unbalanced");
System\Xml\Xsl\Xslt\InvokeGenerator.cs (1)
95while (_iterStack.Count != 0)
System\Xml\Xsl\Xslt\QilGenerator.cs (4)
2864return _vars.Count; 2875Debug.Assert(0 <= varScope && varScope <= _vars.Count); 2876for (int i = _vars.Count - varScope; i-- != 0;) 2886Debug.Assert(_vars.Count == 0, "Accumulated variables left unclaimed");
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (1)
1256while (_newTemplates.Count > 0)
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (1)
192while (_parserStack.Count > 0)
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\RegexNode.cs (1)
207while (toExamine.Count > 0)
System\Text\RegularExpressions\Symbolic\BDD.cs (2)
255while (toVisit.Count > 0) 465while (toVisit.Count > 0)
System.Text.RegularExpressions.Generator (2)
RegexGenerator.Emitter.cs (1)
52while (parentClasses.Count != 0)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (1)
207while (toExamine.Count > 0)
System.Windows.Controls.Ribbon (6)
Microsoft\Windows\Controls\KeyTipService.cs (6)
1158if (_scopeStack.Count == 0 || 1169if (_scopeStack.Count == 0 || 1180Debug.Assert(_scopeStack.Count > 0); 1183DependencyObject stackParentScope = (_scopeStack.Count > 0 ? _scopeStack.Peek() : null); 1195if (_scopeStack.Count > 0) 1202if (_scopeStack.Count > 0)
System.Windows.Forms (6)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
770while (itemsStack.Count > 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (5)
1134if (mergeHistory.MergeHistoryItemsStack.Count > 0) 1142return mergeHistory is not null && mergeHistory.MergeHistoryItemsStack.Count > 0; 1306while (targetToolStrip.MergeHistoryStack.Count > 0 && !foundToolStrip) 1328while (history.MergeHistoryItemsStack.Count > 0) 1347while (reApply.Count > 0)
System.Windows.Forms.Design (16)
System\ComponentModel\Design\DesignerHost.cs (2)
787if (_transactions is not null && _transactions.Count > 0) 869bool IDesignerHost.InTransaction => (_transactions is not null && _transactions.Count > 0) || IsClosingTransaction;
System\ComponentModel\Design\DesignerHost.DesignerHostTransaction.cs (2)
47DesignerTransactionCloseEventArgs e = new(false, transactions.Count == 0); 80DesignerTransactionCloseEventArgs e = new(true, transactions.Count == 0);
System\ComponentModel\Design\UndoEngine.cs (12)
168if (_unitStack.Count == 0) 175if (_unitStack.Count == 0) 183if (_unitStack.Count == 0) 323if (_unitStack.Count > 0) 333if (Enabled && _executingUnit is null && _unitStack.Count == 0) 362if (_unitStack.Count > 0) 372if (Enabled && _executingUnit is null && _unitStack.Count == 0) 406if (_unitStack.Count > 0) 425if (Enabled && _executingUnit is null && _unitStack.Count == 0) 500if (Enabled && _executingUnit is null && _unitStack.Count == 0) 516if (_executingUnit is null && _unitStack.Count > 0) 529_unitStack.Push(CreateUndoUnit(_host.TransactionDescription, _unitStack.Count == 0));
System.Xaml (29)
System\Xaml\Parser\GenericTypeNameParser.cs (2)
294if (_stack.Count != 1) 311if (_stack.Count != 1)
System\Xaml\Parser\MeScanner.cs (2)
403if (bracketCharacterStack.Count == 0) 487if (_context.CurrentBracketModeParseParameters?.BracketCharacterStack.Count > 0)
System\Xaml\Parser\XamlScannerStack.cs (8)
53get { return _stack.Count - 1; } 58get { return (_stack.Count == 0) ? null : _stack.Peek().XamlType; } 63get { return (_stack.Count == 0) ? null : _stack.Peek().TypeNamespace; } 68get { return (_stack.Count == 0) ? null : _stack.Peek().XamlProperty; } 74get { return (_stack.Count == 0) ? false : _stack.Peek().XmlSpacePreserve; } 77Debug.Assert(_stack.Count != 0); 84get { return (_stack.Count == 0) ? false : _stack.Peek().InContent; } 87Debug.Assert(_stack.Count != 0);
System\Xaml\XamlMarkupExtensionWriter.cs (5)
73if (nodes.Count == 0) 335if (writer.nodes.Count == 0) 349if (writer.nodes.Count == 0) 374if (writer.nodes.Count == 0) 603if (writer.nodes.Count == 0)
System\Xaml\XamlObjectReader.cs (1)
96if (nodes.Count == 0)
System\Xaml\XamlXmlWriter.cs (11)
803Debug.Assert(writer.namespaceScopes.Count > 1); 821Debug.Assert(writer.namespaceScopes.Count > 1); 942Debug.Assert(writer.namespaceScopes.Count == 1); 989Debug.Assert(writer.namespaceScopes.Count > 0); 1075Debug.Assert(writer.namespaceScopes.Count > 0); 1088if (writer.namespaceScopes.Count > 0) 1147Debug.Assert(writer.namespaceScopes.Count > 0); 1225Debug.Assert(writer.namespaceScopes.Count > 0); 1353Debug.Assert(writer.namespaceScopes.Count > 0); 1418Debug.Assert(writer.namespaceScopes.Count > 0); 1551Debug.Assert(writer.namespaceScopes.Count > 0);
xunit.console (4)
CommandLine.cs (4)
211while (arguments.Count > 0) 223if (arguments.Count > 0) 239while (arguments.Count > 0) 499if (arguments.Count > 0 &&