Implemented interface members:
property
Count
System.Collections.Generic.ICollection<T>.Count
property
Count
System.Collections.Generic.IReadOnlyCollection<T>.Count
property
Count
System.Collections.ICollection.Count
88 references to Count
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.AspNetCore.Components (2)
CascadingValueSource.cs (1)
92if (_subscribers?.Count > 0)
Reflection\ComponentProperties.cs (1)
377if (_referenceEqualityWritersCache.Count < MaxCachedWriterLookups)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
190var tasks = new List<Task>(_connections.Count);
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\TlsListener.cs (1)
85var currentCount = _connectionTimestamps.Count;
Microsoft.AspNetCore.SignalR.Core (4)
HubConnectionStore.cs (1)
37public int Count => _connections.Count;
Internal\HubGroupList.cs (3)
45public int Count => _groups.Count; 81return list.Count == Count;
Microsoft.Build (9)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (3)
55return ComponentHost.BuildParameters.MaxNodeCount - _nodeContexts.Count; 85if (_nodeContexts.Count + numberOfNodesToCreate > ComponentHost.BuildParameters.MaxNodeCount) 87ErrorUtilities.ThrowInternalError("Exceeded max node count of '{0}', current count is '{1}' ", ComponentHost.BuildParameters.MaxNodeCount, _nodeContexts.Count);
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
821Task[] cleanupTasks = new Task[_projectCachePlugins.Count];
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
574else if (_projectsByInstanceId.Count == 1) 584else if (_projectsByEvaluationId.Count == 1)
Evaluation\ConditionEvaluator.cs (1)
150_mOptimisticSize = conditionPools.Count;
Graph\GraphBuilder.cs (1)
650internal int Count => ReferenceItems.Count;
Graph\ParallelWorkSet.cs (1)
49var completedWork = new Dictionary<TKey, TResult>(_inProgressOrCompletedWork.Count);
Microsoft.Build.Engine.UnitTests (4)
BackEnd\SdkResolverService_Tests.cs (3)
393resolver.ResolvedCalls.Count.ShouldBe(1); 399resolver.ResolvedCalls.Count.ShouldBe(1); 406resolver.ResolvedCalls.Count.ShouldBe(1);
Definition\ProjectEvaluationContext_Tests.cs (1)
290_resolver.ResolvedCalls.Count.ShouldBe(2);
Microsoft.CodeAnalysis (8)
CodeGen\PrivateImplementationDetails.cs (3)
167_mappedFields.Count + _cachedArrayFields.Count + _cachedArrayFieldsForConstants.Count + (_mvidField != null ? 1 : 0));
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1579if (_lazyControlFlowGraphMap?.Count > 0)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
64internal int CopyCount => CopyMap.Count;
Emit\CommonPEModuleBuilder.cs (1)
393=> (int)(_methodBodyMap.Count * 1.5);
Emit\DebugDocumentsBuilder.cs (1)
36internal int DebugDocumentCount => _debugDocuments.Count;
InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.Analyzers (2)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
463if (analyzerToDescriptorLocationsMap.Count <= 1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
309if (map.Count > Threshold)
Microsoft.CodeAnalysis.CSharp (1)
Symbols\NonMissingAssemblySymbol.cs (1)
215return _emittedNameToTypeMap.Count;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\InlineCompletions\XmlSnippetParser.cs (1)
113public int GetCachedSnippetsCount() => _snippetParser._parsedSnippetsCache.Count;
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NonMissingAssemblySymbol.vb (1)
179Return _emittedNameToTypeMap.Count
Microsoft.CodeAnalysis.Workspaces (4)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
64internal int CopyCount => CopyMap.Count;
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
309if (map.Count > Threshold)
Storage\StorageDatabaseLogger.cs (1)
35if (_set.Count > 10 || !_set.TryAdd(ex.GetType(), ex))
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
195=> client._outstandingRequests.Count;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
309if (map.Count > Threshold)
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionFactory.cs (1)
623return innerCache.Count < InnerCacheSoftLimit
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
780internal int Count => _stringEntries.Count + _nonStringEntries.Count;
Microsoft.Maui.Controls (1)
AnimationExtensions.cs (1)
54 static internal int TweenersCounter => s_tweeners.Count;
Microsoft.ML.Core (2)
Data\ProgressReporter.cs (2)
115Contracts.Assert(_subChannels.Count == 0); 166if (_maxSubId == 0 || _subChannels.Count == 0)
Microsoft.ML.Ensemble (2)
Selector\DiversityMeasure\BaseDisagreementDiversityMeasure.cs (1)
18Contracts.Assert(predictions.Count == models.Count);
Selector\SubModelSelector\BestDiverseSelectorMulticlass.cs (1)
46Host.Assert(predictions.Count == models.Count);
Microsoft.NET.StringTools (2)
WeakStringCache.Concurrent.cs (2)
88_scavengeThreshold = _stringsByHashCode.Count * 2; 94_count = _stringsByHashCode.Count;
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
SignalRSamples (1)
ConnectionList.cs (1)
26public int Count => _connections.Count;
SocialWeather (1)
ConnectionList.cs (1)
27public int Count => _connections.Count;
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionPoolGroup.cs (1)
130return _poolCollection.Count;
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
96if (_failedProxies.Count > LargeProxyConfigBoundary && Environment.TickCount64 >= Interlocked.Read(ref _nextFlushTicks))
System.Net.Quic (4)
src\libraries\Common\src\System\Net\SafeHandleCache.cs (4)
111var count = _cache.Count; 119if (_cache.Count >= count) 123NetEventSource.Info(this, $"Current size: {_cache.Count}."); 150NetEventSource.Info(this, $"New size: {_cache.Count}.");
System.Net.Security (10)
src\libraries\Common\src\System\Net\SafeHandleCache.cs (4)
111var count = _cache.Count; 119if (_cache.Count >= count) 123NetEventSource.Info(this, $"Current size: {_cache.Count}."); 150NetEventSource.Info(this, $"New size: {_cache.Count}.");
System\Net\Security\SslSessionsCache.cs (6)
110if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Not found, Current Cache Count = {s_cachedCreds.Count}"); 120if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Not found or invalid, Current Cache Count = {s_cachedCreds.Count}"); 153if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Refused to cache an Invalid Handle {creds}, Current Cache Count = {s_cachedCreds.Count}"); 178if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Caching New Handle = {creds}, Current Cache Count = {s_cachedCreds.Count}"); 207if ((s_cachedCreds.Count % CheckExpiredModulo) == 0) 234if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(null, $"Scavenged cache, New Cache Count = {s_cachedCreds.Count}");
System.Text.Json (4)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (3)
149if (_nameCacheForWriting.Count < NameCacheSizeSoftLimit) 209if (dictionaryKeyPolicy is null && _nameCacheForWriting.Count < NameCacheSizeSoftLimit) 282if (success && _nameCacheForReading.Count < NameCacheSizeSoftLimit)
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (1)
227public int Count => _cache.Count;
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\Regex.Cache.cs (3)
105Debug.Assert(s_cacheDictionary.Count == value); 199Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count); 272Debug.Assert(s_cacheList.Count == s_cacheDictionary.Count);
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
xunit.console (1)
ConsoleRunner.cs (1)
308if (completionMessages.Count > 0)