561 implementations of Count
aspire (1)
src\Shared\CircularBuffer.cs (1)
48public int Count => _buffer.Count;
Aspire.Dashboard (1)
src\Shared\CircularBuffer.cs (1)
48public int Count => _buffer.Count;
Aspire.Dashboard.Tests (1)
Model\ResourceStateViewModelTests.cs (1)
226public int Count => resources.Length;
Aspire.Hosting (3)
ApplicationModel\ResourceAnnotationCollection.cs (1)
72public int Count => _items.Length;
ApplicationModel\ResourceCollection.cs (1)
52public int Count => _resources.Count;
src\Shared\CircularBuffer.cs (1)
48public int Count => _buffer.Count;
dotnet-svcutil-lib (5)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
88public int Count
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (1)
425public int Count
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
56public int Count
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
70public int Count
Shared\Options\ListValue.cs (1)
67public int Count { get { return this.InnerList.Count; } }
GenerateDocumentationAndConfigFiles (25)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
ILAssembler (1)
NamedElementList.cs (1)
37public int Count => _elements.Count;
Microsoft.AspNetCore.Components (1)
src\aspnetcore\src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
312public int Count => _count;
Microsoft.AspNetCore.Components.Endpoints (1)
TempData\TempData.cs (1)
119int ICollection<KeyValuePair<string, object?>>.Count => Data.Count;
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
104int ICollection<KeyValuePair<object, object?>>.Count
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.AspNetCore.Http (4)
HeaderDictionary.cs (1)
152public int Count => Store?.Count ?? 0;
Internal\ItemsDictionary.cs (1)
111int ICollection<KeyValuePair<object, object?>>.Count => _items?.Count ?? 0;
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
src\aspnetcore\src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
143public int Count => _dictionaryStorage != null ? _dictionaryStorage.Count : _count;
Microsoft.AspNetCore.Http.Abstractions (11)
EndpointFilterInvocationContextOfT.Generated.cs (10)
46public int Count => 1; 174public int Count => 2; 309public int Count => 3; 451public int Count => 4; 600public int Count => 5; 756public int Count => 6; 919public int Count => 7; 1089public int Count => 8; 1266public int Count => 9; 1450public int Count => 10;
Routing\RouteValueDictionary.cs (1)
312public int Count => _count;
Microsoft.AspNetCore.HttpOverrides (2)
DualIPNetworkList.cs (2)
32int ICollection<IPNetwork>.Count => _system.Count; 33int ICollection<AspNetIPNetwork>.Count => _aspnet.Count;
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
55public int Count => _inner.Count;
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\CopyOnWriteList.cs (1)
43public int Count => Readable.Count;
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
AttributeDictionary.cs (3)
57public int Count => _items == null ? 0 : _items.Count; 375public int Count => _attributes.Count; 482public int Count => _attributes.Count;
TempDataDictionary.cs (1)
45public int Count
ViewDataDictionary.cs (1)
320public int Count
Microsoft.AspNetCore.Owin (3)
DictionaryStringArrayWrapper.cs (1)
32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count;
DictionaryStringValuesWrapper.cs (1)
77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count;
OwinEnvironment.cs (1)
193int ICollection<KeyValuePair<string, object>>.Count
Microsoft.AspNetCore.Razor.Runtime (1)
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
Microsoft.AspNetCore.Server.HttpSys (3)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
103public int Count
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
115public int Count
UrlPrefixCollection.cs (1)
32public int Count
Microsoft.AspNetCore.Server.IIS (2)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
103public int Count
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
115public int Count
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.cs (1)
115public int Count => GetCountFast();
Internal\ServerAddressesCollection.cs (2)
27public int Count 115public int Count => _addressesCollection.Count;
Microsoft.Build (41)
Collections\ArrayDictionary.cs (1)
84public int Count => count;
Collections\CopyOnWritePropertyDictionary.cs (1)
82public int Count => _backing.Count;
Collections\ItemDictionary.cs (1)
74public int Count
Collections\PropertyDictionary.cs (2)
136int ICollection<KeyValuePair<string, T>>.Count => Count; 147public int Count
Collections\ReadOnlyConvertingDictionary.cs (1)
60public int Count => _backing.Count;
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (2)
459public int CountCount
Construction\ProjectElementContainer.cs (1)
810public int Count => RealizedElements.Count;
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
39public int CountCount => _values.Count; 121public int Count => _projectElements.Count;
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (3)
58public int CountCount => _globalProperties.Count; 173public int Count => _parent._globalProperties.Count;
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (1)
66public int Count => (_itemList == null ? 0 : _itemList.Count) + (_itemTypeDefinition == null ? 0 : 1);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
155public int Count => _list.Count;
Instance\ImmutableProjectCollections\LazyStringValuedList.cs (1)
37public int Count => EnsureListInitialized().Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\8b3a4ac2431f87ea\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\8b3a4ac2431f87ea\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\8b3a4ac2431f87ea\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ArrayBuilder.cs (1)
106public int Count
Microsoft.Build.Framework (4)
Collections\CopyOnWriteDictionary.cs (1)
119public int Count => _backing.Count;
Collections\ReadOnlyCollection.cs (1)
45public int Count
Collections\ReadOnlyEmptyCollection.cs (1)
52public int Count
Collections\ReadOnlyEmptyDictionary.cs (1)
56public int Count
Microsoft.CodeAnalysis (26)
Collections\IdentifierCollection.Collection.cs (1)
39public int Count
Collections\UnionCollection.cs (1)
107public int Count
InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
Microsoft.CodeAnalysis.Analyzers (25)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.AnalyzerUtilities (26)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
67public int Count
Microsoft.CodeAnalysis.CodeStyle (24)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
Microsoft.CodeAnalysis.Extensions.Package (23)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
Microsoft.CodeAnalysis.NetAnalyzers (2)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
53public int Count => _dictionary.Count;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
66public int Count
Microsoft.CodeAnalysis.Razor.Compiler (3)
Language\Intermediate\IntermediateNodeCollection.cs (1)
49public int Count => _inner.Count;
Language\Syntax\SpecializedCollections.cs (1)
123public int Count => 0;
Language\TagHelperCollection.Builder.cs (1)
42public int Count => _items.Count;
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\SynchronizedList.cs (1)
36public int Count
Microsoft.CodeAnalysis.Workspaces (24)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
Microsoft.Extensions.AI (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.AI.Abstractions (5)
AdditionalPropertiesDictionary{TValue}.cs (1)
74public int Count => _dictionary.Count;
Embeddings\GeneratedEmbeddings.cs (1)
56public int Count => _embeddings.Count;
Functions\AIFunctionArguments.cs (1)
111public int Count => _arguments.Count;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.Configuration (2)
ConfigurationManager.cs (2)
206public int Count => _sources.Count; 287public int Count => _properties.Count;
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ServiceCollection.cs (1)
22public int Count => _descriptors.Count;
Microsoft.Extensions.Http (1)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (1)
64public int Count => _services.Count;
Microsoft.Extensions.Http.Diagnostics (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.Primitives (1)
StringValues.cs (1)
91public int Count
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.Logging.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.Metrics.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.MetricsReports.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
49public int Count => Map.Count;
Microsoft.Maui (3)
Hosting\Internal\FontCollection.cs (1)
10 public int Count => _descriptors.Count;
Hosting\Internal\MauiServiceCollection.cs (1)
14 public int Count => _descriptors.Count;
Primitives\LockableObservableListWrapper.cs (1)
46 public int Count
Microsoft.Maui.Controls (25)
DefinitionCollection.cs (1)
42 public int Count
Element\Element.cs (1)
1086 int ICollection<Element>.Count => _inner.Count;
Interactivity\TriggerBase.cs (1)
166 public int Count
Items\SelectionList.cs (1)
32 public int Count => _internal.Count;
Layout\Layout.cs (2)
50 public int CountCount => _children.Count;
LegacyLayouts\LayoutOfT.cs (1)
11 int ICollection<IView>.Count => _children.Count;
Menu\MenuBar.cs (1)
33 public int Count => _menus.Count;
Menu\MenuBarItem.cs (1)
57 public int Count => _menus.Count;
Menu\MenuFlyout.cs (1)
33 public int Count => _menus.Count;
Menu\MenuFlyoutSubItem.cs (1)
25 public int Count => _menus.Count;
NavigationStepRequest.cs (1)
28 public int Count => _pages.Count;
ObservableWrapper.cs (1)
71 public int Count
OrderedDictionary.cs (2)
143 public int Count 404 public int Count
ReadOnlyCastingList.cs (1)
86 public int Count => _list.Count;
ResourceDictionary.cs (1)
178 public int Count
Shell\MenuItemCollection.cs (1)
21 public int Count => _inner.Count;
Shell\ShellElementCollection.cs (1)
22 public int Count => Inner.Count;
Shell\ShellNavigationQueryParameters.cs (1)
55 public int Count => _internal.Count;
SwipeView\SwipeItems.cs (1)
65 public int Count => _swipeItems.Count;
SynchronizedList.cs (1)
44 public int Count
TableView\TableSection.cs (1)
65 public int Count
VisualStateManager.cs (2)
290 public int Count => _internalList.Count; 772 public int Count => _internalList.Count;
Microsoft.Maui.Controls.Maps (2)
HandlerImpl\Polygon.Impl.cs (1)
34 public int Count => Geopath.Count;
HandlerImpl\Polyline.Impl.cs (1)
32 public int Count => Geopath.Count;
Microsoft.ML.Core (1)
Utilities\Tree.cs (1)
79public int Count { get { return _children.Count; } }
Microsoft.ML.SearchSpace (3)
Option\NestOption.cs (1)
86public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count;
Parameter.cs (1)
233public int Count => ParameterType == ParameterType.Object ? (_value as Dictionary<string, Parameter>).Count : 1;
SearchSpace.cs (1)
89public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count;
Microsoft.ML.TorchSharp (1)
Utils\DefaultDictionary.cs (1)
80public int Count => _dictionary.Count;
Microsoft.TemplateEngine.Core (1)
VariableCollection.cs (1)
49public int Count => Keys.Count;
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
Utility\Collection.cs (1)
135public virtual int Count
Mono.Cecil (1)
Mono.Collections.Generic\Collection.cs (1)
25 public int Count {
PresentationCore (41)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
734public int Count
MS\Internal\FontFace\TypefaceCollection.cs (1)
77public int Count
MS\Internal\PartialArray.cs (1)
113public int Count
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (1)
55public int Count
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (1)
50public int Count
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (1)
119public abstract int Count
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PartialList.cs (1)
113public int Count
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
54public int Count
System\Windows\FreezableCollection.cs (1)
344public int Count
System\Windows\Generated\TextDecorationCollection.cs (1)
256public int Count
System\Windows\Media\Animation\Generated\TimelineCollection.cs (1)
255public int Count
System\Windows\Media\Animation\TimelineClockCollection.cs (1)
23public int Count
System\Windows\Media\CharacterMetricsDictionary.cs (1)
59public int Count
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
63public int Count
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (1)
258public int Count
System\Windows\Media\FamilyMapCollection.cs (1)
135public int Count
System\Windows\Media\FamilyTypefaceCollection.cs (1)
122public int Count
System\Windows\Media\Fonts.cs (1)
330public int Count
System\Windows\Media\Generated\DoubleCollection.cs (1)
217public int Count
System\Windows\Media\Generated\DrawingCollection.cs (1)
277public int Count
System\Windows\Media\Generated\GeneralTransformCollection.cs (1)
265public int Count
System\Windows\Media\Generated\GeometryCollection.cs (1)
277public int Count
System\Windows\Media\Generated\GradientStopCollection.cs (1)
265public int Count
System\Windows\Media\Generated\Int32Collection.cs (1)
217public int Count
System\Windows\Media\Generated\PathFigureCollection.cs (1)
266public int Count
System\Windows\Media\Generated\PathSegmentCollection.cs (1)
265public int Count
System\Windows\Media\Generated\PointCollection.cs (1)
217public int Count
System\Windows\Media\Generated\TextEffectCollection.cs (1)
265public int Count
System\Windows\Media\Generated\TransformCollection.cs (1)
277public int Count
System\Windows\Media\Generated\VectorCollection.cs (1)
217public int Count
System\Windows\Media\GlyphRun.cs (2)
2142public int Count 2244public int Count
System\Windows\Media\GlyphTypeface.cs (2)
1827public int Count 1912public int Count
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (1)
263public int Count
System\Windows\Media3D\Generated\MaterialCollection.cs (1)
275public int Count
System\Windows\Media3D\Generated\Model3DCollection.cs (1)
275public int Count
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
215public int Count
System\Windows\Media3D\Generated\Transform3DCollection.cs (1)
275public int Count
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
215public int Count
System\Windows\Media3D\Visual3DCollection.cs (1)
259public int Count
PresentationFramework (19)
MS\Internal\Annotations\ObservableDictionary.cs (1)
218public int Count
MS\Internal\Data\RBTree.cs (1)
579public int Count
MS\Internal\Documents\ContentElementCollection.cs (1)
536public int Count
MS\Internal\ListOfObject.cs (1)
74int ICollection<object>.Count
MS\Internal\WeakDictionary.cs (3)
55public int Count 142public int Count 309public int Count
MS\Internal\WeakHashSet.cs (1)
56public int Count
System\Windows\Controls\ColumnDefinition.cs (1)
371public int Count // int ICollection.Count {get;}; int ICollection<T>.Count {get;}
System\Windows\Controls\CustomDictionarySources.cs (1)
168int ICollection<Uri>.Count
System\Windows\Controls\RowDefinition.cs (1)
366public int Count // int ICollection.Count {get;}; int ICollection<T>.Count {get;}
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
396public int Count
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
170public int Count
System\Windows\Documents\TableCellCollection.cs (1)
350public int Count
System\Windows\Documents\TableColumnCollection.cs (1)
357public int Count
System\Windows\Documents\TableRowCollection.cs (1)
350public int Count
System\Windows\Documents\TableRowGroupCollection.cs (1)
350public int Count
System\Windows\Documents\TextElementCollection.cs (1)
149public int Count
System\Windows\TriggerActionCollection.cs (1)
48public int Count
Roslyn.Diagnostics.Analyzers (25)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
111public int Count
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Shared (2)
EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Shared.Tests (1)
EmptyCollections\EmptyCollectionExtensionsTests.cs (1)
110public int Count => 0;
System.Collections (11)
System\Collections\Generic\LinkedList.cs (1)
49public int Count
System\Collections\Generic\OrderedDictionary.cs (3)
237public int Count => _count; 1477public int Count => _dictionary.Count; 1672public int Count => _dictionary.Count;
System\Collections\Generic\SortedDictionary.cs (3)
137public int Count 587public int Count 748public int Count
System\Collections\Generic\SortedList.cs (3)
282public int Count 1011public int Count 1125public int Count
System\Collections\Generic\SortedSet.cs (1)
266public int Count
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (1)
367public int Count => CountCore;
System\Collections\Frozen\FrozenSet.cs (1)
264public int Count => CountCore;
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
90public int Count
System\Collections\Immutable\ImmutableArray_1.cs (1)
52int ICollection<T>.Count
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
136public int Count
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
133public int Count
System\Collections\Immutable\ImmutableHashSet_1.Builder.cs (1)
83public int Count
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
92public int Count
System\Collections\Immutable\ImmutableList_1.Builder.cs (1)
66public int Count
System\Collections\Immutable\ImmutableList_1.cs (1)
142public int Count => _root.Count;
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
114public int Count
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
108public int Count
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (1)
72public int Count
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
115public int Count
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
53public int Count
System.CommandLine (2)
AliasSet.cs (1)
23public int Count => _aliases.Count;
ChildSymbolList{T}.cs (1)
33public int Count => _children.Count;
System.ComponentModel.Composition (3)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (2)
66public int Count 121public int Count
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (1)
148public int Count
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
95public int Count
System.Data.Common (1)
System\Data\Common\DbBatchCommandCollection.cs (1)
25public abstract int Count { get; }
System.Data.OleDb (1)
DbConnectionStringCommon.cs (1)
82public int Count
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\ActivityTagsCollection.cs (1)
131public int Count => _list.Count;
System\Diagnostics\Metrics\TagList.netcore.cs (1)
52public readonly int Count => _tagsCount;
System.Diagnostics.Process (1)
System\Collections\Specialized\DictionaryWrapper.cs (1)
41public int Count => _contents.Count;
System.DirectoryServices.AccountManagement (3)
System\DirectoryServices\AccountManagement\PrincipalCollection.cs (1)
158public int Count
System\DirectoryServices\AccountManagement\TrackedCollection.cs (1)
95public int Count
System\DirectoryServices\AccountManagement\ValueCollection.cs (1)
340public int Count
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
729public int Count => Items.Length;
System.Linq (5)
System\Linq\Grouping.cs (1)
399int ICollection<TElement>.Count => _count;
System\Linq\Lookup.cs (1)
325public int Count => 0;
System\Linq\Range.SpeedOpt.cs (1)
40public int Count => int.CreateTruncating(_endExclusive - _start);
System\Linq\Repeat.SpeedOpt.cs (1)
34public int Count => _count;
System\Linq\SkipTake.SpeedOpt.cs (1)
104public int Count => GetAdjustedCount(_minIndexInclusive, _maxIndexInclusive, _source.Count);
System.Linq.AsyncEnumerable (2)
System\Linq\GroupBy.cs (1)
437int ICollection<TElement>.Count => _count;
System\Linq\ToLookupAsync.cs (1)
226public int Count => 0;
System.Linq.Expressions (6)
System\Dynamic\ExpandoObject.cs (3)
415public int Count 565public int Count 669int ICollection<KeyValuePair<string, object?>>.Count => _count;
System\Dynamic\Utils\ListArgumentProvider.cs (1)
110public int Count => ElementCount;
System\Linq\Expressions\BlockExpression.cs (1)
783public int Count => _block.ExpressionCount;
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
106public int Count => _size;
System.Linq.Parallel (1)
System\Linq\Parallel\QueryOperators\QueryResults.cs (1)
131public int Count
System.Net.Http (3)
System\Net\Http\Headers\HttpHeaderValueCollection.cs (1)
38public int Count
System\Net\Http\Headers\ObjectCollection.cs (1)
32public int Count => _size;
System\Net\Http\HttpRequestOptions.cs (1)
35int ICollection<KeyValuePair<string, object?>>.Count => Options.Count;
System.Net.HttpListener (1)
System\Net\HttpListenerPrefixCollection.cs (1)
70public int Count => _httpListener.PrefixCollection.Count;
System.Net.NetworkInformation (4)
System\Net\NetworkInformation\GatewayIPAddressInformationCollection.cs (1)
27public virtual int Count
System\Net\NetworkInformation\IPAddressInformationCollection.cs (1)
21public virtual int Count
System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs (1)
21public virtual int Count
System\Net\NetworkInformation\UnicastIPAddressInformationCollection.cs (1)
22public virtual int Count
System.Net.Primitives (2)
System\Net\CookieCollection.cs (1)
121public int Count
System\Net\NetworkInformation\IPAddressCollection.cs (1)
19public virtual int Count
System.Private.CoreLib (15)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (1)
71public int Count => _count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1136public int Count
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (3)
209public int Count => _count - _freeCount; 2035public int Count => _dictionary.Count; 2230public int Count => _dictionary.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
357public int Count => _count - _freeCount;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (1)
127public int Count => _size;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
32public int Count => items.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
33public int Count => list.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
71public int Count => m_dictionary.Count; 278public int Count => _collection.Count; 331public int Count => _collection.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (1)
34public int Count => _set.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
81public int Count => m_names.Length;
System\Array.NativeAot.cs (1)
531public int Count
System.Private.Xml (3)
System\Xml\Xsl\ListBase.cs (1)
25public abstract int Count { get; }
System\Xml\Xsl\QIL\QilNode.cs (1)
114public virtual int Count
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (1)
134public int Count
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
55public int Count => _headerParameters.Count;
System.Security.Principal.Windows (1)
System\Security\Principal\IRCollection.cs (1)
53public int Count
System.ServiceModel.Primitives (4)
System\ServiceModel\Channels\MessageProperties.cs (1)
97public int Count
System\ServiceModel\ServiceChannelManager.cs (1)
348public int Count
System\ServiceModel\SynchronizedCollection.cs (1)
55public int Count
System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
73public int Count
System.Speech (1)
Result\SemanticValue.cs (1)
104public int Count
System.Text.Json (3)
System\Text\Json\Nodes\JsonArray.IList.cs (1)
14public int Count => List.Count;
System\Text\Json\Nodes\JsonObject.IDictionary.cs (1)
129public int Count => Dictionary.Count;
System\Text\Json\Serialization\ConfigurationList.cs (1)
46public int Count => _list.Count;
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\CaptureCollection.cs (1)
62public int Count => _capcount;
System\Text\RegularExpressions\GroupCollection.cs (1)
67public int Count => _match._matchcount.Length;
System\Text\RegularExpressions\MatchCollection.cs (1)
104public int Count
System.Windows.Forms (1)
System\Windows\Forms\Controls\UpDown\NumericUpDownAccelerationCollection.cs (1)
69public int Count
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ListAdapter.cs (1)
26int ICollection<T>.Count => _list.Count;
System.Windows.Forms.Primitives (1)
System\Windows\Forms\NonNullCollection.cs (1)
32public int Count => _list.Count;
System.Xaml (2)
System\Xaml\NameScope.cs (1)
106public int Count => _nameMap?.Count ?? 0;
System\Xaml\NameScopeDictionary.cs (1)
244int ICollection<KeyValuePair<string, object>>.Count
3941 references to Count
aspire (11)
Commands\GroupedHelpWriter.cs (1)
278if (cmd.Arguments.Count == 0)
Commands\LogsCommand.cs (5)
252if (tail.HasValue && entries.Count > tail.Value) 254entries = entries.Skip(entries.Count - tail.Value).ToList(); 277if (entries.Count == 0) 319var tailedEntries = entries.Count > tail.Value 320? entries.Skip(entries.Count - tail.Value)
Commands\McpCallCommand.cs (1)
106if (callResult.Content is { Count: > 0 })
Commands\TelemetryCommandHelpers.cs (3)
485if (resources is null || resources.Count == 0) 628var result = new IOtlpResource[resources.Count]; 629for (var i = 0; i < resources.Count; i++)
Projects\DotNetAppHostProject.cs (1)
1630certActivity.SetDevCertificateEnvironmentVariables(certResult.EnvironmentVariables.Count);
aspire-managed (1)
NuGet\Commands\NuGetPackageAssetResolver.cs (1)
100LibraryCount = target.Libraries.Count,
Aspire.Cli.EndToEnd.Tests (1)
McpDocsE2ETests.cs (1)
302if (result.Content is not { Count: > 0 })
Aspire.Cli.Tests (3)
Commands\AgentMcpCommandTests.cs (1)
550Assert.Equal(3, tools.Count);
Mcp\E2E\McpDocsE2ETests.cs (1)
271if (result.Content is not { Count: > 0 })
Mcp\ExecuteResourceCommandToolTests.cs (1)
324Assert.Equal(2, result.Content.Count);
Aspire.Dashboard (7)
Components\Controls\Chart\ChartDataCalculator.cs (2)
142for (var i = dimensionValues.Count - 1; i >= 0; i--) 199for (var i = dimensionValues.Count - 1; i >= 0; i--)
Components\Controls\Chart\MetricTable.razor.cs (1)
70if (xValuesToAnnounce.Count == 0)
Components\Controls\LogViewer.razor.cs (1)
142return ValueTask.FromResult(new ItemsProviderResult<LogEntry>(entries.Skip(r.StartIndex).Take(r.Count), entries.Count));
Model\GenAI\GenAISchemaHelpers.cs (1)
195if (itemTypeNames.Count == 1)
ServiceClient\DashboardClient.cs (2)
958var resourceLogLines = new ResourceLogLine[logLines.Count]; 960for (var i = 0; i < logLines.Count; i++)
Aspire.Dashboard.Tests (2)
Model\GenAISchemaHelpersTests.cs (1)
71Assert.Equal(2, typeNames.Count);
TelemetryRepositoryTests\MetricsTests.cs (1)
1319Assert.Equal(valueCount, scope.Values.Count);
Aspire.Hosting (6)
ApplicationModel\ArgumentsExecutionConfigurationGatherer.cs (1)
76if (launchToolArgs.Count == 0)
Dcp\DcpExecutor.cs (1)
142using var activity = ProfilingTelemetry.StartDcpRunApplication(_configuration, _model.Resources.Count);
DistributedApplication.cs (1)
814var results = new List<ResourceStateDebugView>(app._model.Resources.Count);
DistributedApplicationBuilder.cs (1)
906for (var i = configuration.Sources.Count - 1; i >= 0; i--)
Orchestrator\ParameterProcessor.cs (2)
553while (unresolvedParameters.Count > 0) 667if (unresolvedParameters.Count == 0)
Aspire.Hosting.Azure (2)
AzureProvisioningResource.cs (1)
92Debug.Assert(compilation.Count == 1);
AzurePublishingContext.cs (1)
88if (model.Resources.Count == 0)
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppExtensions.cs (1)
705for (var i = 0; i < options.InfrastructureResolvers.Count; i++)
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
55if (model.Resources.Count == 0)
Aspire.Hosting.Foundry (2)
HostedAgent\AzureHostedAgentResource.cs (1)
131if (configuration.ProtocolVersions.Count == 0)
HostedAgent\HostedAgentConfiguration.cs (1)
159if (ProtocolVersions.Count == 0)
Aspire.Hosting.Kubernetes (1)
KubernetesPublishingContext.cs (1)
59if (model.Resources.Count == 0)
Aspire.Hosting.Radius (5)
Publishing\SealedSecretApplyStep.cs (1)
720root = stream.Documents.Count > 0 ? stream.Documents[0].RootNode as YamlMappingNode : null;
Secrets\SealedSecretManifest.cs (4)
120if (stream.Documents.Count != 1) 271encryptedData.Children.Count == 0) 537YamlMappingNode mapping => mapping.Children.Count > 0, 538YamlSequenceNode sequence => sequence.Children.Count > 0,
Aspire.Hosting.RemoteHost (2)
Ats\CapabilityDispatcher.cs (1)
890if (unionAttribute?.ConstructorArguments.Count is not > 0)
AtsCapabilityScanner.cs (1)
3352for (var i = typeInfo.Properties.Count - 1; i >= 0; i--)
Aspire.Hosting.RemoteHost.Tests (2)
AtsMarshallerTests.cs (2)
679Assert.Equal(3, list.Count); 705Assert.Equal(2, dict.Count);
Aspire.Hosting.Tests (21)
ApplicationModel\Docker\DockerfileBuilderCallbackAnnotationTests.cs (2)
118Assert.Equal(3, context.Builder.Stages[0].Statements.Count); // FROM + WORKDIR + RUN 231Assert.Equal(4, context.Builder.Stages[0].Statements.Count); // FROM + WORKDIR + RUN + COPY
ApplicationModel\Docker\DockerfileBuilderCallbackContextTests.cs (1)
103Assert.Equal(3, context.Builder.Stages[0].Statements.Count); // FROM + WORKDIR + RUN
ApplicationModel\Docker\DockerfileBuilderEdgeCasesTests.cs (3)
59Assert.Equal(2, stage.Statements.Count); 156Assert.Equal(3, stage.Statements.Count); // FROM + 2 RUN 162Assert.Equal(2, stage.Statements.Count); // FROM + 1 RUN
ApplicationModel\Docker\DockerfileBuilderIntegrationTests.cs (3)
74Assert.Equal(4, stage.Statements.Count); // FROM + WORKDIR + RUN + ENV 80Assert.Equal(3, stage.Statements.Count); 156Assert.Equal(8, stage.Statements.Count); // FROM + WORKDIR + COPY + RUN + COPY + ENV + EXPOSE + CMD
ApplicationModel\Docker\DockerfileStageTests.cs (12)
26Assert.Equal(2, stage.Statements.Count); // FROM + WORKDIR 53Assert.Equal(2, stage.Statements.Count); // FROM + RUN 80Assert.Equal(2, stage.Statements.Count); // FROM + COPY 109Assert.Equal(2, stage.Statements.Count); // FROM + COPY --from 140Assert.Equal(2, stage.Statements.Count); // FROM + ENV 178Assert.Equal(2, stage.Statements.Count); // FROM + EXPOSE 206Assert.Equal(2, stage.Statements.Count); // FROM + CMD 243Assert.Equal(2, stage.Statements.Count); // FROM + USER 274Assert.Equal(7, stage.Statements.Count); // FROM + WORKDIR + COPY + RUN + ENV + EXPOSE + CMD 291Assert.Equal(5, stage.Statements.Count); // FROM + WORKDIR + COPY + USER + CMD 306Assert.Equal(2, stage.Statements.Count); // FROM + COMMENT 500Assert.Equal(8, stage.Statements.Count); // FROM + COMMENT + WORKDIR + COPY + RUN + COMMENT + COPY + CMD
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (1)
111Debug.Assert(exData is not null && exData.Count == 4);
Aspire.TypeSystem (11)
AttributeDataReader.cs (11)
128for (var i = 0; i < attributes.Count; i++) 141for (var i = 0; i < attributes.Count; i++) 154for (var i = 0; i < attributes.Count; i++) 181if (data.ConstructorArguments.Count == 1) 201for (var i = 0; i < data.NamedArguments.Count; i++) 259if (data.ConstructorArguments.Count == 1 && 274for (var i = 0; i < data.ConstructorArguments.Count; i++) 294if (data.ConstructorArguments.Count == 1 && 300for (var i = 0; i < data.NamedArguments.Count; i++) 326if (data.ConstructorArguments.Count > 0 && 332if (data.ConstructorArguments.Count > 1 &&
crossgen2 (1)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
147for (int i = 0; i < command.Options.Count; i++)
csc (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (3)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i) 375writer.Write(Properties.Count);
dotnet (33)
_generated\100\WorkloadListJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\107\WorkloadSearchVersionsJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\118\WorkloadHistoryJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\126\PackInfoJsonSerializerContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
_generated\139\NugetSearchApiJsonSerializerContext.g.cs (1)
64for (int i = 0; i < options.Converters.Count; i++)
_generated\14\CliSchemaJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\149\SdkVulnerabilityJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\156\SlnfJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
_generated\170\TelemetryDiskLoggerJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\177\LocalToolsCacheJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\187\SdkVulnerabilityCacheJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\32\RunFileApiJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\36\CSharpCompilerCommandJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\46\RunFileBuildCacheJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\52\RunFileJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\57\SdkCheckJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\69\ToolListJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\74\GlobalJsonWorkloadSetsJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
_generated\79\WorkloadManifestUpdaterJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\84\WorkloadInstallJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\92\InstallStateJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
CliSchema.cs (4)
126if (arguments.Count == 0) 140if (options.Count == 0) 154if (subcommands.Count == 0) 168if (aliases.Count == 0)
Commands\Run\RunTelemetry.cs (2)
195return project.GetItems("PackageReference").Count; 205return project.GetItems("ProjectReference").Count;
MsbuildProject.cs (1)
241if (itemGroup.Children.Count == 0)
Parser.cs (2)
116for (int i = rootCommand.Options.Count - 1; i >= 0; i--) 501for (int i = 0; i < listCommand.Arguments.Count; i++)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildProtocol.cs (3)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i) 375writer.Write(Properties.Count);
dotnet-aot (19)
_generated\106\NugetSearchApiJsonSerializerContext.g.cs (1)
64for (int i = 0; i < options.Converters.Count; i++)
_generated\113\NugetServiceIndexJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\15\CliSchemaJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\29\TelemetryDiskLoggerJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\34\WorkloadManifestUpdaterJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\44\SdkVulnerabilityJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\54\RunFileBuildCacheJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\62\InstallStateJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\67\SdkCheckJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\74\SlnfJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
_generated\81\LocalToolsCacheJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\93\ToolListJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
src\sdk\src\Cli\dotnet\CliSchema.cs (4)
126if (arguments.Count == 0) 140if (options.Count == 0) 154if (subcommands.Count == 0) 168if (aliases.Count == 0)
src\sdk\src\Cli\dotnet\MsbuildProject.cs (1)
241if (itemGroup.Children.Count == 0)
src\sdk\src\Cli\dotnet\Parser.cs (2)
116for (int i = rootCommand.Options.Count - 1; i >= 0; i--) 501for (int i = 0; i < listCommand.Arguments.Count; i++)
dotnet-dev-certs (2)
_generated\7\DevCertsJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
Program.cs (1)
308if (certificates.Count == 0)
dotnet-razorpagegenerator (1)
Program.cs (1)
48Console.WriteLine($"{results.Count} files successfully generated.");
dotnet-svcutil-lib (79)
CodeDomFixup\ConfigToCode.cs (3)
169if (toRemoves.Count > 0) 295if (toRemoves.Count > 0) 421if (toRemoves.Count > 0)
CommandProcessorOptions.cs (1)
878Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count);
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerInfo.cs (1)
77if (_providerOptions.Count > 0)
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (16)
466if (rules.Count > 0) 481if (uniqueSourceTypes.Count > 0) 495_w.Write(group.FindUniqueSourceTypes(typeof(object)).Count > 0 ? "ChangeTypeWildcardDestination" : "ChangeListType"); 522if (uniqueDestTypes.Count > 0) 534if (group.FindUniqueDestinationTypes(typeof(object)).Count > 0) 568while (i < uniqueSourceTypes.Count) 576if (uniqueSourceTypes.Count != 0) 578if (IsInterfaceMethod(tDst) && uniqueSourceTypes.Count > 1) 615if (uniqueSourceTypes.Count != 0 || uniqueDestTypes.Count != 0) 625if (uniqueSourceTypes.Count != 0) 644if (uniqueDestTypes.Count != 0) 736int cnt = rulesSwitch.Count; 792if (rules.Count == 0) 803if (rules.Count > 1 && IsInterfaceMethod(tSrc) && IsInterfaceMethod(tDst)) 812if (rules.Count == 1)
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (1)
302for (int i = 0; i < context.ElementDecl.DefaultAttDefs.Count; ++i)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
1056for (int i = 0; i < currentElementDecl.DefaultAttDefs.Count; ++i)
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (1)
545for (int i = 0; i < context.ElementDecl.DefaultAttDefs.Count; ++i)
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\FunctionQuery.cs (5)
27Query[] tmp = new Query[other._args.Count]; 51XPathResultType[] argTypes = new XPathResultType[_args.Count]; 52for (int i = 0; i < _args.Count; i++) 73object[] argVals = new object[_args.Count]; 74for (int i = 0; i < _args.Count; i++)
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\StringFunctions.cs (7)
30Query[] tmp = new Query[other._argList.Count]; 42for (int i = 0; i < _argList.Count; i++) 78if (_argList.Count > 0) 124while (count < _argList.Count) 174if (_argList.Count == 3) 207if (_argList.Count > 0) 217if (_argList.Count > 0)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (3)
716DataContract[] paramContracts = new DataContract[genInfo.Parameters.Count]; 717for (int i = 0; i < genInfo.Parameters.Count; i++) 914if (knownTypeContracts == null || knownTypeContracts.Count == 0)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
1707else if (nestedParamCounts.Count > 1 || !parametersFromBuiltInNamespaces) 2025if (nestedParameterCounts.Count > 1 || !genericNameProvider.ParametersFromBuiltInNamespaces)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
205for (int i = 0; i < knownTypeList.Count; i++)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
479IncrementCollectionCount(xmlWriter, collection.Count);
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\DefaultClaimSet.cs (3)
46get { return _claims.Count; } 59for (int i = 0; i < _claims.Count; ++i) 74for (int i = 0; i < _claims.Count; ++i)
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (2)
65return _claims.Count; 286for (int i = 0; i < _claims.Count; ++i)
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (4)
135if (authorizationPolicies != null && authorizationPolicies.Count == 1 && authorizationPolicies[0] is UnconditionalPolicy) 140else if (authorizationPolicies == null || authorizationPolicies.Count <= 0) 148object[] policyState = new object[authorizationPolicies.Count]; 156for (int i = 0; i < authorizationPolicies.Count; i++)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\WSSecurityJan2004.cs (1)
234for (int i = 0; i < _strEntries.Count; ++i)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
28for (int i = 0; i < collection.Count; i++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
389for (int i = 0; i < newStrings.Count; i++) 419for (int i = 0; i < newStrings.Count; i++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CloseCollectionAsyncResult.cs (2)
24_count = collection.Count; 31for (int index = 0; index < collection.Count; index++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ContextBindingElementImporter.cs (1)
68if (unrecognized.BindingAsserions.Count == 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\OpenCollectionAsyncResult.cs (2)
25_count = collection.Count; 32for (int index = 0; index < collection.Count; index++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (2)
156if (b1.OperationSupportingTokenParameters.Count != b2.OperationSupportingTokenParameters.Count)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (4)
736if (assertions.Count > 0) 754if (assertions.Count > 0) 772if (assertions.Count > 0) 787if (assertions.Count > 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
112for (int i = 0; i < faultInfos.Count; i++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerFaultFormatter.cs (1)
91for (int i = 0; i < faultInfos.Count; i++)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
493object[] messageHeaderOfTArray = (object[])Array.CreateInstance(TypedHeaderManager.GetMessageHeaderType(headerDescription.Type), messageHeaderOfTAttributes.Count);
FrameworkFork\System.ServiceModel\System\ServiceModel\EmptyArray.cs (2)
21if (collection.Count == 0) 27T[] array = new T[collection.Count];
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
804if (scopedAuthenticators == null || scopedAuthenticators.Count == 0) 973if (_channelSupportingTokenAuthenticatorSpecification.Count == 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (1)
78if ((outgoing != null) && (outgoing.Count > 0))
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceSecurityContext.cs (1)
94if (identities != null && identities.Count == 1)
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
72get { lock (_sync) { return _items.Count; } }
Shared\MSBuildProj.cs (1)
808LockFileTarget target = lockFile.Targets.Count == 1 ? lockFile.Targets[0] : lockFile.Targets.FirstOrDefault(t =>
Shared\ProjectDependency.cs (1)
435for (int idx = dependencies.Count - 1; idx >= 0; idx--)
dotnet-svcutil.xmlserializer (5)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (5)
263_parent._namespaceMappings = new Dictionary<string, string>(namespaceMappingsArgs.Count); 296if (excludeTypesArgs != null && excludeTypesArgs.Count > 0) 334_parent._referencedAssemblies = new List<Assembly>(referenceArgs.Count); 384Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count); 419if (referencedAssembliesArgs != null && referencedAssembliesArgs.Count > 0)
dotnet-user-jwts (4)
_generated\12\JwtSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
Commands\ClearCommand.cs (1)
54var count = jwtStore.Jwts.Count;
Commands\ListCommand.cs (2)
60if (jwtStore.Jwts is { Count: > 0 } jwts) 75if (jwtStore.Jwts is { Count: > 0 } jwts)
dotnet-user-secrets (3)
_generated\2\SecretManagerJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
Internal\SecretsStore.cs (1)
49public int Count => _secrets.Count;
Internal\SetCommand.cs (1)
81context.Reporter.Output(Resources.FormatMessage_Saved_Secrets(provider.CurrentData.Count));
GenerateDocumentationAndConfigFiles (52)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (3)
64CodeGenerationNamespaceInfo.GetImports(innermostNamespace).Count == 0) 93for (var i = index; i < availableIndices.Count; i++) 200Contract.ThrowIfTrue(availableIndices != null && availableIndices.Count != declarationList.Count + 1);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
ilc (1)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
147for (int i = 0; i < command.Options.Count; i++)
ILCompiler.Compiler (5)
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (2)
856if (!factory.LazyGenericsPolicy.UsesLazyGenerics(_method) && templateLayout.Count > 0) 1028if (!factory.LazyGenericsPolicy.UsesLazyGenerics(_type) && templateLayout.Count > 0)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (1)
276List<ElfSymbol> sortedSymbols = new(definedSymbols.Count + undefinedSymbols.Count);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (2)
569var sortedDefinedSymbols = new List<MachSymbol>(definedSymbols.Count); 594_dySymbolTable.ExternalSymbolsCount = (uint)definedSymbols.Count;
ILCompiler.ReadyToRun (5)
Compiler\ProfileDataManager.cs (2)
293if (list.Count <= sampleSize) 304int index = rand.Next(list.Count);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (1)
276List<ElfSymbol> sortedSymbols = new(definedSymbols.Count + undefinedSymbols.Count);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (2)
569var sortedDefinedSymbols = new List<MachSymbol>(definedSymbols.Count); 594_dySymbolTable.ExternalSymbolsCount = (uint)definedSymbols.Count;
illink (6)
Microsoft.Analyzers.Extra.Tests (1)
UsingToStringInLoggersTests.cs (1)
72Assert.Equal(3, d.Count);
Microsoft.Analyzers.Local (1)
JsonObject.cs (1)
33public int Count => _properties.Count;
Microsoft.Analyzers.Local.Tests (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.AspNetCore (4)
BootstrapHostBuilder.cs (1)
106for (int i = _builder.Services.Count - 1; i >= 0; i--)
WebApplication.cs (1)
280if (compositeEndpointDataSource.DataSources.Intersect(_webApplication.DataSources).Count() == _webApplication.DataSources.Count)
WebApplicationBuilder.cs (1)
438var hasEndpointDataSources = _builtApplication.DataSources.Count > 0;
WebHost.cs (1)
262if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
Microsoft.AspNetCore.AsyncState (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.AspNetCore.Authentication (2)
PropertiesSerializer.cs (1)
51writer.Write(properties.Items.Count);
TicketSerializer.cs (1)
144writer.Write(claim.Properties.Count);
Microsoft.AspNetCore.Authentication.BearerToken (1)
_generated\4\BearerTokenJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationSchemeProvider.cs (1)
214if (_schemes.Count == 1)
Microsoft.AspNetCore.Authentication.DeviceBoundSessions (1)
_generated\10\DeviceBoundSessionJsonContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
47if (Options.Fields.Count > 0)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
702if (properties == null || properties.Items.Count == 0)
Microsoft.AspNetCore.Authentication.Twitter (1)
_generated\6\TwitterJsonContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Authorization (1)
AuthorizationPolicy.cs (1)
192skipEnumeratingData = dataList.Count == 0;
Microsoft.AspNetCore.Components (7)
_generated\4\PersistentServicesRegistryJsonContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
ParameterView.cs (1)
305var builder = new ParameterViewBuilder(parameters.Count);
PersistentComponentState.cs (1)
247if (_existingState == null || _existingState.Count > 0)
Routing\RouteTableFactory.cs (2)
203seen.EnsureCapacity(builder.InboundEntries.Count); 205for (var i = 0; i < builder.InboundEntries.Count; i++)
src\aspnetcore\src\Http\Routing\src\RouteConstraintMatcher.cs (1)
56if (constraints == null || constraints.Count == 0)
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Components.AI (7)
Engine\UIAgent.cs (1)
161UIAgentLog.AddedToHistory(_logger, response.Messages.Count);
Pipeline\BlockMappingContext.cs (5)
21_handled = new bool[update.Contents.Count]; 41for (var i = 0; i < contents.Count; i++) 67_handledCount >= Update.Contents.Count && (Update.Contents.Count > 0 || _updateHandled); 119while (++_index < _contents.Count)
Pipeline\BlockMappingPipeline.cs (1)
55BlockMappingPipelineLog.ProcessingUpdate(_logger, update.Role?.Value, update.Contents.Count, contentTypes);
Microsoft.AspNetCore.Components.Endpoints (15)
_generated\14\ResourceCollectionSerializerContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
_generated\33\BrowserOptionsJsonContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
_generated\44\ServerComponentJsonContext.IListComponentParameter.g.cs (1)
57for (int i = 0; i < value.Count; i++)
_generated\5\ImportMapSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\52\ServerComponentJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\58\PrerenderComponentApplicationStoreSerializerContext.g.cs (1)
68for (int i = 0; i < options.Converters.Count; i++)
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (4)
191for (var i = 0; i < props.Count; i++) 208for (var i = 0; i < props.Count; i++) 339for (var i = 0; i < properties.Count; i++) 439for (var i = 0; i < constructorParameters.Count; i++)
Forms\ClientValidationCache.cs (1)
127_validationOptions.Resolvers.Count > 0
Rendering\EndpointHtmlRenderer.cs (1)
282var result = new List<StringValues>(form.Keys.Count);
Serialization\JsonStoredDataSerializer.cs (1)
73var result = new Dictionary<string, object?>(data.Count);
TempData\CookieTempDataProvider.cs (1)
123if (values.Count == 0)
TempData\SessionStorageTempDataProvider.cs (1)
60if (values.Count == 0)
Microsoft.AspNetCore.Components.QuickGrid (1)
QuickGrid.razor.cs (1)
547_ariaBodyRowCount = _currentNonVirtualizedViewItems.Count;
Microsoft.AspNetCore.Components.Server (17)
_generated\13\CircuitPersistenceManagerSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\29\ServerComponentJsonContext.IListComponentParameter.g.cs (1)
57for (int i = 0; i < value.Count; i++)
_generated\3\JavaScriptInitializersManifestJsonContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\38\ServerComponentJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\44\PrerenderComponentApplicationStoreSerializerContext.g.cs (1)
68for (int i = 0; i < options.Converters.Count; i++)
Builder\ServerRazorComponentsEndpointConventionBuilderExtensions.cs (1)
50for (var i = 0; i < b.Metadata.Count; i++)
Circuits\ComponentParameterDeserializer.cs (5)
28if (parameterValues.Count != parametersDefinitions.Count) 31Log.MismatchedParameterAndDefinitions(_logger, parametersDefinitions.Count, parameterValues.Count); 35for (var i = 0; i < parametersDefinitions.Count; i++)
Circuits\RemoteJSRuntime.cs (1)
52for (var i = _options.JsonTypeInfoResolvers.Count - 1; i >= 0; i--)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
82for (var i = 0; i < c.Metadata.Count; i++)
ProtectedBrowserStorage\ProtectedBrowserStorageJsonSerializerOptions.cs (1)
16for (var i = circuitOptions.Value.JsonTypeInfoResolvers.Count - 1; i >= 0; i--)
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (3)
326if (source != null && source.Count > 0) 596writer.WriteMapHeader(headers.Count); 597if (headers.Count > 0)
Microsoft.AspNetCore.Components.Server.AutoPause (1)
_generated\2\AutoPauseJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Components.Testing (1)
_generated\8\E2EManifestJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Components.Web (3)
_generated\15\WebRendererSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Virtualization\Virtualize.cs (2)
1046_previousFirstLoadedItem = Items != null && _itemsBefore < Items.Count 1095Items!.Count));
Microsoft.AspNetCore.Components.WebAssembly (7)
_generated\20\WebAssemblyJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\26\PrerenderComponentApplicationStoreSerializerContext.g.cs (1)
68for (int i = 0; i < options.Converters.Count; i++)
Prerendering\WebAssemblyComponentParameterDeserializer.cs (5)
32if (parameterValues.Count != parametersDefinitions.Count) 35throw new InvalidOperationException($"The number of parameter definitions '{parametersDefinitions.Count}' does not match the number parameter values '{parameterValues.Count}'."); 38for (var i = 0; i < parametersDefinitions.Count; i++)
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
_generated\9\InteractiveRequestOptionsSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ContentEncodingNegotiator.cs (1)
48if (!StringWithQualityHeaderValue.TryParseList(accept, out var encodings) || encodings.Count == 0)
Microsoft.AspNetCore.Components.WebView (1)
_generated\11\SourceGenerationContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
211 logger.AddingRootComponent(rootComponent.ComponentType.FullName ?? string.Empty, rootComponent.Selector, rootComponent.Parameters?.Count ?? 0);
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
294 logger.AddingRootComponent(rootComponent.ComponentType.FullName ?? string.Empty, rootComponent.Selector, rootComponent.Parameters?.Count ?? 0);
Microsoft.AspNetCore.Connections.Abstractions (2)
ConnectionItems.cs (1)
106get { return Items.Count; }
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Cors (8)
Infrastructure\CorsPolicy.cs (3)
33if (Headers == null || Headers.Count != 1 || Headers[0] != CorsConstants.AnyHeader) 49if (Methods == null || Methods.Count != 1 || Methods[0] != CorsConstants.AnyMethod) 65if (Origins == null || Origins.Count != 1 || Origins[0] != CorsConstants.AnyOrigin)
Infrastructure\CorsService.cs (5)
109result.VaryByOrigin = policy.Origins.Count > 1 || !policy.IsDefaultIsOriginAllowed; 178if (result.AllowedHeaders.Count > 0) 183if (result.AllowedMethods.Count > 0) 197if (result.AllowedExposedHeaders.Count > 0) 216for (var i = 0; i < headerValues.Count; i++)
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\XmlKeyManager.cs (1)
116_keyEscrowSink = escrowSinks.Count > 0 ? new AggregateKeyEscrowSink(escrowSinks) : null;
Microsoft.AspNetCore.Diagnostics (3)
_generated\7\ExtensionsExceptionJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
DeveloperExceptionPage\Views\CompilationErrorPage.Designer.cs (1)
334for (var i = 0; i < Model.ErrorDetails.Count; i++)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
253for (var i = 0; i < attributes.Count; i++)
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Logging\HeaderReader.cs (2)
25_headers = headersToLog.Count == 0 ? [] : headersToLog.ToArray(); 31if (headers.Count == 0)
Logging\HttpLoggingRedactionInterceptor.cs (1)
152|| (!logContext.IsAnyEnabled(HttpLoggingFields.Response) && logContext.Parameters.Count == 0))
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
259for (var i = 0; i < _serviceDescriptor.Methods.Count; i++)
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
111for (var i = fields.Count - 1; i >= 0; i--)
Microsoft.AspNetCore.HeaderParsing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.AspNetCore.HostFiltering (1)
MiddlewareConfigurationManager.cs (1)
47if (options.AllowedHosts?.Count > 0 && !TryProcessHosts(options.AllowedHosts, allowedHosts))
Microsoft.AspNetCore.Hosting (4)
_generated\11\SourceGenerationContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
GenericHost\GenericWebHostService.cs (1)
68if (addresses != null && !addresses.IsReadOnly && addresses.Count == 0)
Internal\WebHost.cs (1)
264if (addresses != null && !addresses.IsReadOnly && addresses.Count == 0)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
253for (var i = 0; i < attributes.Count; i++)
Microsoft.AspNetCore.Html.Abstractions (4)
HtmlContentBuilder.cs (4)
35public int Count => Entries.Count; 105var count = Entries.Count; 132var count = Entries.Count; 162var count = Entries.Count;
Microsoft.AspNetCore.Http (3)
Internal\ItemsDictionary.cs (1)
111int ICollection<KeyValuePair<object, object?>>.Count => _items?.Count ?? 0;
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Http.Abstractions (42)
EndpointFilterInvocationContextOfT.Generated.cs (40)
64for (int i = 0; i < Arguments.Count; i++) 77for (int i = 0; i < Arguments.Count; i++) 85for (int i = 0; i < Arguments.Count; i++) 102for (int i = 0; i < Arguments.Count; i++) 192for (int i = 0; i < Arguments.Count; i++) 205for (int i = 0; i < Arguments.Count; i++) 213for (int i = 0; i < Arguments.Count; i++) 231for (int i = 0; i < Arguments.Count; i++) 327for (int i = 0; i < Arguments.Count; i++) 340for (int i = 0; i < Arguments.Count; i++) 348for (int i = 0; i < Arguments.Count; i++) 367for (int i = 0; i < Arguments.Count; i++) 469for (int i = 0; i < Arguments.Count; i++) 482for (int i = 0; i < Arguments.Count; i++) 490for (int i = 0; i < Arguments.Count; i++) 510for (int i = 0; i < Arguments.Count; i++) 618for (int i = 0; i < Arguments.Count; i++) 631for (int i = 0; i < Arguments.Count; i++) 639for (int i = 0; i < Arguments.Count; i++) 660for (int i = 0; i < Arguments.Count; i++) 774for (int i = 0; i < Arguments.Count; i++) 787for (int i = 0; i < Arguments.Count; i++) 795for (int i = 0; i < Arguments.Count; i++) 817for (int i = 0; i < Arguments.Count; i++) 937for (int i = 0; i < Arguments.Count; i++) 950for (int i = 0; i < Arguments.Count; i++) 958for (int i = 0; i < Arguments.Count; i++) 981for (int i = 0; i < Arguments.Count; i++) 1107for (int i = 0; i < Arguments.Count; i++) 1120for (int i = 0; i < Arguments.Count; i++) 1128for (int i = 0; i < Arguments.Count; i++) 1152for (int i = 0; i < Arguments.Count; i++) 1284for (int i = 0; i < Arguments.Count; i++) 1297for (int i = 0; i < Arguments.Count; i++) 1305for (int i = 0; i < Arguments.Count; i++) 1330for (int i = 0; i < Arguments.Count; i++) 1468for (int i = 0; i < Arguments.Count; i++) 1481for (int i = 0; i < Arguments.Count; i++) 1489for (int i = 0; i < Arguments.Count; i++) 1515for (int i = 0; i < Arguments.Count; i++)
HostString.cs (1)
244var count = patterns.Count;
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
1020var requestHeaders = new Dictionary<string, StringValues>(existingRequestFeature.Headers.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\WebSocketsTransport.cs (1)
114if (context.Options.Headers.Count > 0)
Microsoft.AspNetCore.Http.Connections.Common (2)
NegotiateProtocol.cs (2)
106var transportCount = response.AvailableTransports.Count; 124var formatCount = availableTransport.TransferFormats.Count;
Microsoft.AspNetCore.Http.Extensions (18)
_generated\11\ProblemDetailsJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
DefaultProblemDetailsWriter.cs (2)
34if (acceptHeader.Count == 0) 38for (var i = 0; i < acceptHeader.Count; i++)
HeaderDictionaryTypeExtensions.cs (7)
70if (values == null || values.Count == 0) 74else if (values.Count == 1) 80var newValues = new string[values.Count]; 81for (var i = 0; i < values.Count; i++) 101switch (values.Count) 110var newValues = new string[values.Count]; 111for (var i = 0; i < values.Count; i++)
QueryBuilder.cs (1)
74for (var i = 0; i < _params.Count; i++)
RequestDelegateFactory.cs (3)
352if (factoryContext.EndpointBuilder.FilterFactories.Count > 0) 423Debug.Assert(factoryContext.EndpointBuilder.FilterFactories.Count > 0); 495for (var i = factoryContext.EndpointBuilder.FilterFactories.Count - 1; i >= 0; i--)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (4)
191for (var i = 0; i < props.Count; i++) 208for (var i = 0; i < props.Count; i++) 339for (var i = 0; i < properties.Count; i++) 439for (var i = 0; i < constructorParameters.Count; i++)
Microsoft.AspNetCore.Http.Results (3)
src\aspnetcore\src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (1)
268if (etagHeader?.Count > 0)
Microsoft.AspNetCore.HttpLogging (2)
W3CLoggingMiddleware.cs (2)
75var additionalHeaderElements = new string[_additionalRequestHeaders.Count]; 178if (_additionalRequestHeaders.Count != 0)
Microsoft.AspNetCore.HttpOverrides (3)
ForwardedHeadersMiddleware.cs (3)
71if (_options.AllowedHosts == null || _options.AllowedHosts.Count == 0) 216var checkKnownIps = _options.KnownIPNetworks.Count > 0 || _options.KnownProxies.Count > 0;
Microsoft.AspNetCore.HttpsPolicy (1)
HstsMiddleware.cs (1)
84for (var i = 0; i < _excludedHosts.Count; i++)
Microsoft.AspNetCore.Identity (14)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (11)
97if (options.EndpointBuilder.FilterFactories.Count > 0) 217if (options.EndpointBuilder.FilterFactories.Count > 0) 401if (options.EndpointBuilder.FilterFactories.Count > 0) 517if (options.EndpointBuilder.FilterFactories.Count > 0) 664if (options.EndpointBuilder.FilterFactories.Count > 0) 782if (options.EndpointBuilder.FilterFactories.Count > 0) 898if (options.EndpointBuilder.FilterFactories.Count > 0) 1015if (options.EndpointBuilder.FilterFactories.Count > 0) 1131if (options.EndpointBuilder.FilterFactories.Count > 0) 1237if (options.EndpointBuilder.FilterFactories.Count > 0) 1351for (var i = routeHandlerFilters.Count - 1; i >= 0; i--)
_generated\17\IdentityEndpointsJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\50\IdentityJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
SignInManager.cs (1)
1229(await UserManager.GetValidTwoFactorProvidersAsync(user)).Count > 0;
Microsoft.AspNetCore.Identity.UI (10)
_generated\17\ExternalLogins_cshtml.g.cs (2)
109if (Model.CurrentLogins?.Count > 0) 301if (Model.OtherLogins?.Count > 0)
_generated\30\Register_cshtml.g.cs (1)
370if ((Model.ExternalLogins?.Count ?? 0) == 0)
_generated\49\Login_cshtml.g.cs (1)
431if ((Model.ExternalLogins?.Count ?? 0) == 0)
_generated\59\ExternalLogins_cshtml.g.cs (2)
109if (Model.CurrentLogins?.Count > 0) 301if (Model.OtherLogins?.Count > 0)
_generated\7\Login_cshtml.g.cs (1)
418if ((Model.ExternalLogins?.Count ?? 0) == 0)
_generated\72\Register_cshtml.g.cs (1)
380if ((Model.ExternalLogins?.Count ?? 0) == 0)
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (1)
103ShowRemoveButton = passwordHash != null || CurrentLogins.Count > 1;
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (1)
103ShowRemoveButton = passwordHash != null || CurrentLogins.Count > 1;
Microsoft.AspNetCore.Localization (1)
AcceptLanguageHeaderRequestCultureProvider.cs (1)
29if (acceptLanguageHeader == null || acceptLanguageHeader.Count == 0)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Filters\FilterContext.cs (1)
84for (var i = Filters.Count - 1; i >= 0; i--)
ModelBinding\ModelPropertyCollection.cs (1)
39for (var i = 0; i < Items.Count; i++)
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Mvc.ApiExplorer (7)
ApiResponseTypeProvider.cs (1)
379if (apiResponse.ApiResponseFormats.Count > 0)
DefaultApiDescriptionProvider.cs (4)
131if (apiDescription.ParameterDescriptions.Count > 0) 219for (var i = context.Results.Count - 1; i >= 0; i--) 251for (var i = context.Results.Count - 1; i >= 0; i--) 382if (action.ActionConstraints != null && action.ActionConstraints.Count > 0)
EndpointMetadataApiDescriptionProvider.cs (2)
387else if (apiResponseType.ApiResponseFormats.Count == 0 && CreateDefaultApiResponseFormat(apiResponseType.Type) is { } defaultResponseFormat) 418if (supportedResponseTypes.Count > 1)
Microsoft.AspNetCore.Mvc.Core (92)
ActionConstraints\ActionConstraintCache.cs (3)
54if (action.ActionConstraints == null || action.ActionConstraints.Count == 0) 59var items = new List<ActionConstraintItem>(action.ActionConstraints.Count); 60for (var i = 0; i < action.ActionConstraints.Count; i++)
ActionConstraints\DefaultActionConstraintProvider.cs (1)
24for (var i = 0; i < context.Results.Count; i++)
ApplicationModels\ActionAttributeRouteModel.cs (6)
23if (actionModel.Controller.Selectors.Count > 0) 37for (var i = additionalSelector.ActionConstraints.Count - 1; i >= 0; i--) 45for (var i = additionalSelector.EndpointMetadata.Count - 1; i >= 0; i--) 122for (var i = 0; i < actionConstraints.Count; i++) 136for (var i = 0; i < controllerMetadata.Count; i++) 167for (var i = 0; i < actionModel.Controller.Selectors.Count; i++)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
105for (var i = 0; i < selectorModel.Count; i++)
ApplicationModels\ControllerActionDescriptorBuilder.cs (3)
64var parameterDescriptors = new List<ParameterDescriptor>(action.Parameters.Count); 183if (selectorModel.ActionConstraints?.Count > 0) 191if (selectorModel.EndpointMetadata?.Count > 0)
ApplicationModels\ControllerActionDescriptorProvider.cs (2)
53for (var i = 0; i < context.Results.Count; i++) 62for (var i = 0; i < context.Results.Count; i++)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
81for (var i = 0; i < action.Parameters.Count; i++)
Authorization\AuthorizeFilter.cs (2)
123for (var i = 0; i < context.Filters.Count; i++) 212for (var i = 0; i < filters.Count; i++)
ChallengeResult.cs (1)
100if (AuthenticationSchemes != null && AuthenticationSchemes.Count > 0)
Controllers\ControllerBinderDelegateProvider.cs (6)
122if (parameters.Count == 0) 127var parameterBindingInfo = new BinderItem[parameters.Count]; 128for (var i = 0; i < parameters.Count; i++) 168if (properties.Count == 0) 173var propertyBindingInfo = new BinderItem[properties.Count]; 175for (var i = 0; i < properties.Count; i++)
DependencyInjection\ApplicationModelConventionExtensions.cs (1)
37for (var i = list.Count - 1; i >= 0; i--)
Filters\DefaultFilterProvider.cs (1)
22var resultsCount = results.Count;
Filters\FilterFactory.cs (1)
19var staticFilterItems = new FilterItem[actionDescriptor.FilterDescriptors.Count];
ForbidResult.cs (2)
101if (AuthenticationSchemes != null && AuthenticationSchemes.Count > 0) 103for (var i = 0; i < AuthenticationSchemes.Count; i++)
Formatters\AcceptHeaderParser.cs (1)
23for (var i = 0; i < acceptHeaders.Count; i++)
Formatters\TextInputFormatter.cs (2)
77if (SupportedEncodings.Count == 0) 93for (int i = 0; i < SupportedEncodings.Count; i++)
Formatters\TextOutputFormatter.cs (11)
68if (SupportedEncodings.Count == 0) 88for (var i = 0; i < SupportedEncodings.Count; i++) 112if (SupportedEncodings.Count > 0) 195if (acceptCharsetHeaders != null && acceptCharsetHeaders.Count > 0) 198for (var i = 0; i < acceptValues.Count; i++) 203for (var j = 0; j < SupportedEncodings.Count; j++) 246for (var i = 0; i < values.Count; i++) 264return values.Count <= SortStackAllocThreshold 283for (var i = 0; i < values.Count; i++) 318var sorted = new List<StringWithQualityHeaderValue>(values.Count); 319for (var i = 0; i < values.Count; i++)
Infrastructure\ControllerActionInvoker.cs (2)
519if (actionDescriptor.BoundProperties.Count == 0 && 520actionDescriptor.Parameters.Count == 0)
Infrastructure\DefaultActionDescriptorCollectionProvider.cs (1)
132if (context.Results.Count == 0)
Infrastructure\DefaultOutputFormatterSelector.cs (6)
58if (formatters.Count == 0) 61if (formatters.Count == 0) 193for (var i = 0; i < sortedAcceptHeaders.Count; i++) 200for (var j = 0; j < formatters.Count; j++) 241for (var i = 0; i < sortedAcceptableContentTypes.Count; i++) 249for (var k = 0; k < formatters.Count; k++)
Infrastructure\ResourceInvoker.Log.cs (1)
27var count = action.RouteValues.Count;
ModelBinding\Binders\BodyModelBinder.cs (1)
117for (var i = 0; i < _formatters.Count; i++)
ModelBinding\Binders\BodyModelBinderProvider.cs (1)
75if (_formatters.Count == 0)
ModelBinding\Binders\DictionaryModelBinder.cs (2)
120if (result.Model is IDictionary<TKey, TValue?> { Count: > 0 }) 145if (keys.Count == 0)
ModelBinding\Binders\FormFileModelBinder.cs (6)
69if (postedFiles.Count == 0 && 82if (postedFiles.Count == 0) 93if (postedFiles.Count == 0 && !bindingContext.IsTopLevelObject) 159if (postedFiles.Count == 0) 181for (var i = 0; i < Items.Count; i++) 196for (var i = 0; i < Items.Count; i++)
ModelBinding\CompositeValueProvider.cs (3)
70for (var i = 0; i < factories.Count; i++) 113var itemCount = Items.Count; 135if (result != null && result.Count > 0)
ModelBinding\Metadata\HasValidatorsValidationMetadataProvider.cs (1)
18if (modelValidatorProviders.Count > 0 && modelValidatorProviders.All(p => p is IMetadataBasedModelValidatorProvider))
ModelBinding\Metadata\MetadataDetailsProviderExtensions.cs (1)
35for (var i = list.Count - 1; i >= 0; i--)
ModelBinding\ModelBinderProviderExtensions.cs (1)
35for (var i = list.Count - 1; i >= 0; i--)
ModelBinding\PrefixContainer.cs (2)
30if (_originalValues.Count == 0) 36_sortedValues = new string[_originalValues.Count];
ModelBinding\Validation\CompositeModelValidatorProvider.cs (1)
35for (var i = 0; i < ValidatorProviders.Count; i++)
ModelBinding\Validation\DefaultModelValidatorProvider.cs (2)
21for (var i = 0; i < context.Results.Count; i++) 41for (var i = 0; i < validatorMetadata.Count; i++)
ModelBinding\Validation\ModelValidatorProviderExtensions.cs (1)
35for (var i = list.Count - 1; i >= 0; i--)
ModelBinding\ValueProviderFactoryExtensions.cs (1)
35for (var i = list.Count - 1; i >= 0; i--)
ProducesAttribute.cs (1)
78for (var i = 0; i < context.Filters.Count; i++)
Routing\ActionConstraintMatcherPolicy.cs (2)
42if (action?.ActionConstraints is IList<IActionConstraintMetadata> { Count: > 0 } constraints && HasSignificantActionConstraint(constraints)) 55for (var i = 0; i < constraints.Count; i++)
Routing\ActionEndpointFactory.cs (4)
401if (action.FilterDescriptors != null && action.FilterDescriptors.Count > 0) 409if (action.ActionConstraints != null && action.ActionConstraints.Count > 0) 456if (builder.FilterFactories.Count > 0 && controllerActionDescriptor is not null) 475for (var i = routeHandlerFilters.Count - 1; i >= 0; i--)
Routing\UrlHelper.cs (1)
39if (routers.Count == 0)
SignOutResult.cs (2)
117if (AuthenticationSchemes.Count == 0) 123for (var i = 0; i < AuthenticationSchemes.Count; i++)
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\aspnetcore\src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (1)
268if (etagHeader?.Count > 0)
Microsoft.AspNetCore.Mvc.Cors (2)
CorsApplicationModelProvider.cs (2)
89var selectorsCount = selectors.Count; 97var actionConstraintsCount = actionConstraints.Count;
Microsoft.AspNetCore.Mvc.DataAnnotations (5)
DataAnnotationsClientModelValidatorProvider.cs (1)
62var resultsCount = results.Count;
DataAnnotationsModelValidatorProvider.cs (2)
56var resultsCount = results.Count; 105var validatorMetadataCount = validatorMetadata.Count;
DefaultClientModelValidatorProvider.cs (1)
24var resultsCount = results.Count;
NumericClientModelValidatorProvider.cs (1)
28var resultsCount = results.Count;
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
ValidationProblemDetailsWrapper.cs (1)
82if (ProblemDetails.Errors.Count == 0)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
BsonTempDataSerializer.cs (1)
126if (values?.Count > 0)
Microsoft.AspNetCore.Mvc.Razor (8)
Compilation\DefaultViewCompiler.cs (1)
53viewsFeature.ViewDescriptors.Count,
RazorPage.cs (1)
212if (PreviousSectionWriters != null && PreviousSectionWriters.Count > 0)
RazorViewEngine.cs (6)
59if (_options.ViewLocationFormats.Count == 0) 66if (_options.AreaViewLocationFormats.Count == 0) 241var expandersCount = expanders.Count; 345var expandersCount = expanders.Count; 403var viewExpirationTokensCount = viewExpirationTokens.Count; 437for (var i = 0; i < viewDescriptor.ExpirationTokens.Count; i++)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (8)
PageDirectiveFeature.cs (3)
18for (var i = builder.Phases.Count - 1; i >= 0; i--) 124var messages = new string[diagnostics.Count]; 125for (var i = 0; i < diagnostics.Count; i++)
RazorReferenceManager.cs (1)
58var referencePaths = new List<string>(_options.AdditionalReferencePaths.Count);
RuntimeCompilationFileProvider.cs (2)
43if (fileProviders.Count == 0) 53else if (fileProviders.Count == 1)
RuntimeViewCompiler.cs (2)
64precompiledViews.Count, 139for (var i = 0; i < item.ExpirationTokens.Count; i++)
Microsoft.AspNetCore.Mvc.RazorPages (27)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (3)
78var handlerDescriptors = new HandlerMethodDescriptor[handlerModels.Count]; 100var parameters = new HandlerParameterDescriptor[methodParameters.Count]; 123for (var i = 0; i < properties.Count; i++)
Infrastructure\CompiledPageActionDescriptorProvider.cs (1)
57var lookup = new Dictionary<string, CompiledViewDescriptor>(feature.ViewDescriptors.Count, StringComparer.Ordinal);
Infrastructure\DefaultPageHandlerMethodSelector.cs (2)
89for (var i = 0; i < handlers.Count; i++) 105for (var i = 0; i < handlers.Count; i++)
Infrastructure\PageActionDescriptorProvider.cs (1)
49for (var i = 0; i < pageRouteModels.Count; i++)
Infrastructure\PageActionInvoker.cs (6)
184if (_actionDescriptor.BoundProperties.Count == 0 && (_handler == null || _handler.Parameters.Count == 0)) 206for (var i = 0; i < _actionDescriptor.HandlerMethods.Count; i++) 224if (handler.Parameters.Count == 0) 229var arguments = new object?[handler.Parameters.Count]; 260for (var i = 0; i < _actionDescriptor.HandlerMethods.Count; i++)
Infrastructure\PageActionInvokerCache.cs (6)
131if (actionDescriptor.HandlerMethods == null || actionDescriptor.HandlerMethods.Count == 0) 136var results = new PageHandlerExecutorDelegate[actionDescriptor.HandlerMethods.Count]; 138for (var i = 0; i < actionDescriptor.HandlerMethods.Count; i++) 148if (actionDescriptor.HandlerMethods == null || actionDescriptor.HandlerMethods.Count == 0) 153var results = new PageHandlerBinderDelegate[actionDescriptor.HandlerMethods.Count]; 155for (var i = 0; i < actionDescriptor.HandlerMethods.Count; i++)
Infrastructure\PageBinderFactory.cs (6)
23if (properties == null || properties.Count == 0) 29var propertyBindingInfo = new BinderItem[properties.Count]; 30for (var i = 0; i < properties.Count; i++) 54for (var i = 0; i < properties.Count; i++) 89if (handler.Parameters == null || handler.Parameters.Count == 0) 95var parameterBindingInfo = new BinderItem[handler.Parameters.Count];
Infrastructure\PageResultExecutor.cs (2)
63var viewStarts = new IRazorPage[pageContext.ViewStartFactories.Count]; 64for (var i = 0; i < pageContext.ViewStartFactories.Count; i++)
Microsoft.AspNetCore.Mvc.TagHelpers (15)
AnchorTagHelper.cs (2)
180(_routeValues != null && _routeValues.Count > 0)) 219if (_routeValues != null && _routeValues.Count > 0)
Cache\CacheTagKey.cs (6)
298if (values == null || values.Count == 0) 309for (var i = 0; i < values.Count; i++) 336for (var i = 0; i < values.Count; i++) 352if (values1 == null || values2 == null || values1.Count != values2.Count) 357for (var i = 0; i < values1.Count; i++)
ComponentTagHelper.cs (1)
98var parameters = _parameters is null || _parameters.Count == 0 ? ParameterView.Empty : ParameterView.FromDictionary(_parameters);
FormActionTagHelper.cs (2)
193(_routeValues != null && _routeValues.Count > 0)) 231if (_routeValues != null && _routeValues.Count > 0)
FormTagHelper.cs (2)
166(_routeValues != null && _routeValues.Count > 0); 238if (_routeValues != null && _routeValues.Count > 0)
OptionTagHelper.cs (1)
78if (currentValues?.Values != null && currentValues.Values.Count != 0)
RenderAtEndOfFormTagHelper.cs (1)
55for (var i = 0; i < formContext.EndOfFormContent.Count; i++)
Microsoft.AspNetCore.Mvc.Testing (2)
_generated\2\CustomJsonSerializerContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
WebApplicationFactory.cs (1)
378if (serverAddressFeature?.Addresses.Count > 0)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
CookieTempDataProvider.cs (1)
109var hasValues = (values != null && values.Count > 0);
DefaultHtmlGenerator.cs (4)
1563var count = itemsList.Count; 1593var optionGenerated = new bool[itemsList.Count]; 1594for (var i = 0; i < itemsList.Count; i++) 1615for (var j = i; j < itemsList.Count; j++)
Filters\SaveTempDataFilter.cs (1)
126for (var i = 0; i < filters.Count; i++)
Infrastructure\DefaultTempDataSerializer.cs (1)
130if (values == null || values.Count == 0)
Rendering\MultiSelectList.cs (1)
230for (var index = 0; index < _groups.Count; index++)
Rendering\TagBuilder.cs (1)
308if (attributes != null && attributes.Count > 0)
SessionStateTempDataProvider.cs (1)
54var hasValues = (values != null && values.Count > 0);
ViewDataDictionary.cs (1)
322get { return _data.Count; }
Microsoft.AspNetCore.OpenApi (19)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (2)
93if (options.EndpointBuilder.FilterFactories.Count > 0) 189for (var i = routeHandlerFilters.Count - 1; i >= 0; i--)
_generated\6\OpenApiJsonSchemaContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Services\OpenApiDocumentService.cs (6)
231server?.Features.Get<IServerAddressesFeature>()?.Addresses is { Count: > 0 } addresses) 388if (description.SupportedResponseTypes.Count == 0) 548if (eventDataSchema.Discriminator?.Mapping is { Count: > 0 } mapping) 552else if (eventDataSchema is OpenApiSchema { AnyOf.Count: > 0 } schema 718if (supportedRequestFormats.Count == 0) 902if (supportedRequestFormats.Count == 0)
Services\Schemas\OpenApiSchemaService.cs (10)
341if (schema.Type is null && schema.Properties is { Count: > 0 }) 359if (schema.AnyOf is { Count: > 0 }) 367for (var i = 0; i < schema.AnyOf.Count; i++) 395if (schema.AllOf is { Count: > 0 }) 397for (var i = 0; i < schema.AllOf.Count; i++) 403if (schema.OneOf is { Count: > 0 }) 405for (var i = 0; i < schema.OneOf.Count; i++) 532if (schema.AnyOf is { Count: > 0 } && jsonTypeInfo.PolymorphismOptions is not null) 538if (schema.AnyOf.Count <= anyOfIndex) 554if (schema.Properties is { Count: > 0 })
Microsoft.AspNetCore.OutputCaching (4)
OutputCacheEntry.cs (1)
86var count = headers.Count;
OutputCacheKeyProvider.cs (1)
349if (dictionary == null || dictionary.Count == 0)
OutputCacheMiddleware.cs (1)
540for (var i = 0; i < ifNoneMatchETags?.Count; i++)
RecyclableReadOnlySequenceSegment.cs (1)
85int count = segments.Count;
Microsoft.AspNetCore.Owin (6)
DictionaryStringArrayWrapper.cs (1)
32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count;
DictionaryStringValuesWrapper.cs (1)
77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count;
OwinEnvironment.cs (4)
181if (arrayIndex + _owinEntries.Count + _context.Items.Count > array.Length) 195get { return _owinEntries.Count + _context.Items.Count; } 500return _contextEntries.Count; 503return _entries.Count + _contextDependentEntries.Count - (_deletedKeys?.Count ?? 0);
Microsoft.AspNetCore.Razor (5)
TagHelpers\ReadOnlyTagHelperAttributeList.cs (3)
52var itemsCount = items.Count; 122var itemsCount = items.Count; 155var itemsCount = items.Count;
TagHelpers\TagHelperAttributeList.cs (2)
95for (var i = 0; i < Items.Count; i++) 185for (var i = Items.Count - 1; i >= 0; i--)
Microsoft.AspNetCore.Razor.Runtime (2)
src\aspnetcore\src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\aspnetcore\src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\EnumerableExtensions.cs (1)
178count = collection.Count;
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
483for (var i = 0; i < ifNoneMatchEtags.Count; i++)
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionProvider.cs (1)
89if (!StringWithQualityHeaderValue.TryParseList(accept, out var encodings) || encodings.Count == 0)
Microsoft.AspNetCore.Rewrite (6)
ApacheModRewrite\FileParser.cs (3)
27if (tokens.Count > 4) 46if (tokens.Count == 4) 65if (tokens.Count == 4)
ApacheModRewrite\RuleBuilder.cs (2)
23if (_actions.Count == 0 || _match == null) 37if (tokens.Count == 4)
ApacheModRewrite\Tokenizer.cs (1)
105for (var i = 0; i < tokens.Count; i++)
Microsoft.AspNetCore.Routing (34)
Builder\EndpointRouteBuilderExtensions.cs (1)
208if (options.EndpointBuilder?.FilterFactories.Count > 0)
CompositeEndpointDataSource.cs (1)
81if (_dataSources.Count is 0)
Matching\NegotiationMatcherPolicy.cs (4)
86!StringWithQualityHeaderValue.TryParseList(header, out var values) || values.Count == 0) 134for (var j = 0; j < values.Count; j++) 433!StringWithQualityHeaderValue.TryParseList(header, out var values) || values.Count == 0) 444for (var i = 0; i < values.Count; i++)
RequestDelegateFilterPipelineBuilder.cs (1)
42for (var i = options.EndpointBuilder.FilterFactories.Count - 1; i >= 0; i--)
RouteConstraintMatcher.cs (1)
56if (constraints == null || constraints.Count == 0)
RouteEndpointBuilder.cs (2)
67if (metadata.Count > 0) 75for (var i = 0; i < metadata.Count; i++)
RouteEndpointDataSource.cs (2)
244var hasValidationResolvers = builder.ApplicationServices.GetService<IOptions<ValidationOptions>>() is { Value: { } options } && options.Resolvers.Count > 0; 255if (isRouteHandler || builder.FilterFactories.Count > 0)
RouteValuesAddressScheme.cs (2)
43var matchCount = matchResults.Count; 46if (matchResults.Count == 1)
Template\RoutePrecedence.cs (4)
37ValidateSegementLength(template.Segments.Count); 43for (var i = 0; i < template.Segments.Count; i++) 91ValidateSegementLength(template.Segments.Count); 97for (var i = 0; i < template.Segments.Count; i++)
Template\RouteTemplate.cs (3)
39for (var i = 0; i < Segments.Count; i++) 105return index >= Segments.Count ? null : Segments[index]; 120for (var i = 0; i < Parameters.Count; i++)
Template\TemplateMatcher.cs (3)
36_hasDefaultValue = new bool[Template.Segments.Count]; 37_defaultValues = new object[Template.Segments.Count]; 39for (var i = 0; i < Template.Segments.Count; i++)
Tree\LinkGenerationDecisionTree.cs (5)
70if (_root.Matches.Count > 0 || _root.Criteria.Count > 0 || _conventionalEntries.Count > 0) 118var matchesCount = matches.Count; 126var criteriaCount = criteria.Count; 239if (node.Criteria.Count == 0)
Tree\TreeRouter.cs (1)
158for (var i = 0; i < matches.Count; i++)
Tree\UrlMatchingTree.cs (2)
77for (var i = 0; i < entry.RouteTemplate.Segments.Count; i++) 252for (var i = currentParameterIndex; i < segments.Count; i++)
ValidationEndpointFilterFactory.cs (2)
27if (options is null || options.Resolvers.Count == 0) 64if (entry.Index >= context.Arguments.Count)
Microsoft.AspNetCore.Routing.Abstractions (3)
RouteData.cs (3)
277for (; i < snapshotRouters.Count && i < routers.Count; i++) 282for (; i < snapshotRouters.Count; i++) 288for (i = routers.Count - 1; i >= snapshotRouters.Count; i--)
Microsoft.AspNetCore.Server.HttpSys (8)
AuthenticationManager.cs (1)
183if (challenges.Count > 0)
HttpSysListener.cs (3)
325if (authChallenges != null && authChallenges.Count > 0) 340var nativeHeaderValues = allocator.AllocAsPointer<HTTP_KNOWN_HEADER>(authChallenges.Count); 343for (var headerValueIndex = 0; headerValueIndex < authChallenges.Count; headerValueIndex++)
MessagePump.cs (1)
75var hostingUrlsPresent = _serverAddresses.Addresses.Count > 0;
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
105get { return Store.Count; }
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
120count += _extra != null ? _extra.Count : _requestMemoryBlob.CountUnknownHeaders();
UrlPrefixCollection.cs (1)
38return _prefixes.Count;
Microsoft.AspNetCore.Server.IIS (3)
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
105get { return Store.Count; }
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
120count += _extra != null ? _extra.Count : _requestMemoryBlob.CountUnknownHeaders();
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
253for (var i = 0; i < attributes.Count; i++)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
TestMatrix.cs (1)
205if (ApplicationTypes.Count == 1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelServerOptions.cs (1)
387var cert = certs.Count > 0 ? certs[0] : null;
Microsoft.AspNetCore.SignalR.Core (1)
HubConnectionHandler.cs (1)
119if (supportedProtocols == null || supportedProtocols.Count == 0)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
581if (message.Headers != null && message.Headers.Count > 0)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Protocol\MessagePackHubProtocolWorker.cs (3)
326if (source != null && source.Count > 0) 596writer.WriteMapHeader(headers.Count); 597if (headers.Count > 0)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
578if (message.Headers != null && message.Headers.Count > 0)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Internal\DefaultHubMessageSerializer.cs (1)
16_hubProtocols = new List<IHubProtocol>(supportedProtocols.Count);
Microsoft.AspNetCore.StaticAssets (5)
_generated\12\StaticAssetsManifestJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
src\aspnetcore\src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
StaticAssetsInvoker.cs (2)
305if (ifMatch?.Count > 0) 321if (ifNoneMatch?.Count > 0)
Microsoft.AspNetCore.StaticFiles (5)
DefaultFilesMiddleware.cs (1)
60for (int matchIndex = 0; matchIndex < _options.DefaultFileNames.Count; matchIndex++)
src\aspnetcore\src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
StaticFileContext.cs (2)
149if (ifMatch?.Count > 0) 164if (ifNoneMatch?.Count > 0)
Microsoft.AspNetCore.Testing (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
ServiceFakesHostExtensions.cs (1)
73if (feature is null || feature.Addresses.Count == 0)
Microsoft.AspNetCore.Watch.BrowserRefresh (2)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserRefreshMiddleware.cs (2)
157for (var i = 0; i < acceptHeaders.Count; i++) 194for (var i = 0; i < acceptHeaders.Count; i++)
Microsoft.AspNetCore.WebSockets (1)
WebSocketMiddleware.cs (1)
43_anyOriginAllowed = _options.AllowedOrigins.Count == 0 || _options.AllowedOrigins.Contains("*", StringComparer.Ordinal);
Microsoft.Build (210)
_generated\7\TasksDetailsJsonContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
BackEnd\BuildManager\BuildManager.cs (4)
1445if (loggerTypes is { Count: > 0 }) 2313ProjectErrorUtilities.VerifyThrowInvalidProject(entryPointNode.ProjectInstance.Targets.Count > 0, entryPointNode.ProjectInstance.ProjectFileLocation, "NoTargetSpecified"); 3004if (newNodes?.Count != response.NumberOfNodesToCreate || newNodes.Any(n => n == null)) 3354if (loggingService.Loggers.Count == 0)
BackEnd\BuildManager\BuildParameters.cs (1)
518_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(value.Count);
BackEnd\BuildManager\BuildRequestData.cs (1)
149GlobalPropertiesDictionary = new PropertyDictionary<ProjectPropertyInstance>(globalProperties.Count);
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
39public int Count => _backingProperties.Count;
BackEnd\Components\Caching\ConfigCache.cs (1)
388_byMetadata = new ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration>(Environment.ProcessorCount, configurationsById.Count);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
107if (nodeContexts.Count > 0)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (4)
274MSBuildEventSource.Log.NodeReuseScanStop(possibleRunningNodesList.Count); 277if (possibleRunningNodesList.Count > 0) 279CommunicationsUtilities.Trace($"Attempting to connect to {possibleRunningNodesList.Count} existing processes '{expectedProcessName}'..."); 726int count = nodeProcesses.Count;
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
742return nodeContexts.Count == 1;
BackEnd\Components\Logging\LoggingService.cs (3)
1234Assumed.Positive(descriptions.Count, "loggerDescriptions was null"); 2091if ((WarningsAsErrors.Count == 0 && WarningAsErrorNotOverriden(warningEvent)) || WarningsAsErrors.Contains(warningEvent.Code)) 2110((codesByProject.Count == 0 && (codesToIgnoreByProject is null || !codesToIgnoreByProject.Contains(warningEvent.Code)))
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
599string? targetNames = buildRequest.TargetNames != null && buildRequest.TargetNames.Count > 0
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
320buckets.EnsureCapacity(buckets.Count + items.Count);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (4)
302if (group == null || group.Count == 0) 360if (parameterValues.Capacity < child.Metadata.Count + AdditionalCapacityBuffer) 362parameterValues.Capacity = child.Metadata.Count + AdditionalCapacityBuffer; 592if (items.Count == 0 || specification.Length == 0)
BackEnd\Components\RequestBuilder\Lookup.cs (8)
526if (groupFound?.Count > 0 557int itemsCount = groupFound?.Count ?? 0; // Start with initial set 598bool willFilter = (groupFound?.Count > 0) || allAdds != null; 611if (groupFound?.Count > 0) 675if (group.Count == 0) 745if (group.Count == 0) 814if (items.Count == 0) 820PrimaryRemoveTable.EnsureCapacityForItemType(itemType, items.Count);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
1537if (warningsAsErrors?.Count > 0) 1545if (warningsNotAsErrors?.Count > 0) 1552if (warningsAsMessages?.Count > 0)
BackEnd\Components\RequestBuilder\TargetBuilder.cs (4)
439if ((afterTargets.Count != 0) && didPushTargets) 457if (beforeTargets.Count != 0 && pushedTargets) 668List<TargetEntry> targetsToPush = new List<TargetEntry>(targets.Count); 671for (int i = targets.Count - 1; i >= 0; i--)
BackEnd\Components\RequestBuilder\TargetEntry.cs (2)
702List<TargetSpecification> allErrorTargets = new List<TargetSpecification>(_target.OnErrorChildren.Count); 822for (; (currentTask < _target.Children.Count) && !_cancellationToken.IsCancellationRequested; ++currentTask)
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (13)
616if (inputItems.Count > 0) 633if (upToDateInputItems.Count == outputItems.Count) 665itemsChanged = inputItems.Count; 676if (itemsChanged == inputItems.Count) 684if (itemsChanged < inputItems.Count) 821if (itemVectorContents.Count > 0) 959Assumed.Positive(inputs.Count, "Need to specify inputs."); 960Assumed.Positive(outputs.Count, "Need to specify outputs."); 961if (inputs.Count > 0) 966if (outputs.Count > 0) 1002for (int i = 1; i < outputs.Count; i++) 1081if (inputs.Count > 0) 1086if (outputs.Count > 0)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (4)
258List<string> taskParameters = new List<string>(_taskNode.ParametersForBuild.Count + _taskNode.Outputs.Count); 267for (int i = 0; i < _taskNode.Outputs.Count; i++) 1065var declaredProjects = new HashSet<string>(projectReferenceItems.Count + 1, FileUtilities.PathComparer); 1085undeclaredProjects ??= new List<string>(projectReferenceItems.Count);
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
300Assumed.Equal(targetOutputsPerProject.Length, result.TargetOutputsPerProject.Count, $"{targetOutputsPerProject.Length} != {result.TargetOutputsPerProject.Count}"); 778return (WarningsAsErrors.Count == 0 && WarningAsErrorNotOverriden(warningCode)) || WarningsAsErrors.Contains(warningCode);
BackEnd\Components\SdkResolution\SdkResult.cs (9)
113_additionalPaths?.Count == result._additionalPaths?.Count && 114_propertiesToAdd?.Count == result._propertiesToAdd?.Count && 115_itemsToAdd?.Count == result._itemsToAdd?.Count && 116_environmentVariablesToAdd?.Count == result._environmentVariablesToAdd?.Count && 121for (int i = 0; i < _additionalPaths.Count; i++)
BackEnd\Shared\BuildRequest.cs (1)
194_targets = new List<string>(escapedTargets.Count);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
913if (items.Count == 0 || items.All(i => string.IsNullOrWhiteSpace(i.EvaluatedInclude)))
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (13)
1010ITaskItem[] finalInputs = new ITaskItem[taskItems.Count]; 1011for (int i = 0; i < taskItems.Count; i++) 1029Array finalInputs = Array.CreateInstanceFromArrayType(parameterType, taskItems.Count); 1033for (int i = 0; i < taskItems.Count; i++) 1046string[] finalInputs = new string[taskItems.Count]; 1047for (int i = 0; i < taskItems.Count; i++) 1057bool[] finalInputs = new bool[taskItems.Count]; 1058for (int i = 0; i < taskItems.Count; i++) 1071Array finalTaskInputs = Array.CreateInstanceFromArrayType(parameterType, taskItems.Count); 1075for (int i = 0; i < taskItems.Count; i++) 1560if (finalTaskItems.Count == 0) 1566if (finalTaskItems.Count != 1) 1696if ((finalTaskItems.Count > 0) || isRequired)
Collections\CopyOnReadEnumerable.cs (1)
74list = new List<TResult>(collection.Count);
Collections\CopyOnWritePropertyDictionary.cs (1)
230if (thisBacking.Count != otherDict.Count)
Collections\ItemDictionary.cs (1)
512while (_listEnumerator.Current == null || _listEnumerator.Current.Count == 0);
Collections\PropertyDictionary.cs (3)
153return ((ICollection<T>)_properties).Count; 566var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default); 625List<TResult> result = new(propertiesCollection.Count);
Collections\ReadOnlyConvertingDictionary.cs (2)
60public int Count => _backing.Count; 150Assumed.GreaterThanOrEqual(array.Length - arrayIndex, _backing.Count, "Specified array size insufficient to hold the contents of the collection.");
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (1)
176suggestedCapacity = coll.Count;
Definition\ProjectCollection.cs (4)
436_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(globalProperties.Count); 1322var mergedProperties = new Dictionary<string, string>(globalProperties.Count, MSBuildNameIgnoreCaseComparer.Default); 1513if (_hostServices != null && _loadedProjects.GetMatchingProjectsIfAny(project.FullPath).Count == 0) 2182if (project.GlobalPropertiesCount != globalProperties.Count)
Definition\ProjectItem.cs (2)
277{ return Link != null ? Link.DirectMetadata.Count : _directMetadata != null ? _directMetadata.Count : 0; } 302public int MetadataCount => Metadata.Count + ItemSpecModifiers.All.Length;
Definition\ProjectItemDefinition.cs (1)
104get { return Link != null ? Link.Metadata.Count : (_metadata == null) ? 0 : _metadata.Count; }
Definition\Toolset.cs (2)
820int count = _environmentProperties.Count + reservedProperties.Count + Properties.Values.Count + _globalProperties.Count + 1; 833count += subToolsetProperties.Count;
Evaluation\Conditionals\FunctionCallExpressionNode.cs (3)
130if (items.Count == 0) 134else if (items.Count == 1) 161var expandedCount = expanded.Count;
Evaluation\Evaluator.cs (5)
551List<ProjectItemGroupTaskMetadataInstance> metadata = itemElement.Metadata.Count > 0 ? new List<ProjectItemGroupTaskMetadataInstance>() : null; 1968if (sdkResult?.EnvironmentVariablesToAdd is IDictionary<string, string> sdkEnvironmentVariablesToAdd && sdkEnvironmentVariablesToAdd.Count > 0) 2676for (int i = 0; i < strings.Count - 1; i++) 2686if (strings.Count > 1) 2691sb.Append('\"').Append(strings[strings.Count - 1]).Append('\"');
Evaluation\Expander.cs (1)
346if ((itemsToAdd == null /* broke out early non empty */ || (itemsToAdd.Count > 0)) && (options & ExpanderOptions.BreakOnNotEmpty) != 0)
Evaluation\Expander.ItemExpander.cs (4)
116List<TransformEntry> output = new(itemsOfType.Count); 238List<TransformEntry> entries = new(items.Count); 461if (itemsOfType.Count == 0) 493entries ??= new List<TransformEntry>(itemsOfType.Count);
Evaluation\ItemDataCollectionValue.cs (1)
38int count = (_value is IList<I> list) ? list.Count : (_value is null ? 0 : 1);
Evaluation\Preprocessor.cs (3)
67_importTable = new Dictionary<XmlElement, IList<ProjectRootElement>>(imports.Count); 301for (int i = 0; i < resolvedList.Count; i++) 322if (i < resolvedList.Count - 1)
Graph\GraphBuilder.cs (1)
683propertyDictionary = new PropertyDictionary<ProjectPropertyInstance>(properties.Count);
Graph\ProjectGraph.cs (2)
648if (entryProjectTargets == null || entryProjectTargets.Count == 0) 817if (targetNames == null || targetNames.Count == 0)
Graph\ProjectGraphNode.cs (3)
53$"{truncatedProjectFile}, #GlobalProps={ProjectInstance.GlobalProperties.Count}, #Props={ProjectInstance.Properties.Count}, #Items={ProjectInstance.Items.Count}, #in={ReferencingProjects.Count}, #out={ProjectReferences.Count}";
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
121public int Count => _projectElements.Count; 141CopyTo(array, arrayIndex, _projectElements.Count); 168ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _projectElements.Count);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (5)
58public int Count => _globalProperties.Count; 88ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _globalProperties.Count); 173public int Count => _parent._globalProperties.Count; 202CopyTo(array, arrayIndex, _parent._globalProperties.Count); 207ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _parent._globalProperties.Count);
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (3)
47if (index > _itemList.Count) 52if (index == _itemList.Count) 66public int Count => (_itemList == null ? 0 : _itemList.Count) + (_itemTypeDefinition == null ? 0 : 1);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (4)
56public int Count => _allCachedItems.Count; 72if (kvp.Value == null || kvp.Value.Count == 0) 155public int Count => _list.Count; 185ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _list.Count);
Instance\ImmutableProjectCollections\ImmutableProjectMetadataCollectionConverter.cs (1)
46public int Count => _properties.Count;
Instance\ProjectInstance.cs (17)
401var projectItemToInstanceMap = this.CreateItemsSnapshot(project.Items, project.ItemTypes.Count, keepEvaluationCache); 506var paths = new List<string>(imports.Count); 521var paths = new List<string>(imports.Count); 577_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(globalProperties.Count); 702var projectItemToInstanceMap = this.CreateItemsSnapshot(new ReadOnlyCollection<ProjectItem>(data.Items), data.ItemTypes.Count, keepEvaluationCache); 881_items = new ItemDictionary<ProjectItemInstance>(that.Items.Count); 1737get { return _targets.Count; } 1983if (sdkResult?.EnvironmentVariablesToAdd is IDictionary<string, string> sdkEnvironmentVariablesToAdd && sdkEnvironmentVariablesToAdd.Count > 0) 2663int typeCount = _items.ItemTypes.Count; 2669int itemCount = itemList.Count; 3272_globalProperties = new PropertyDictionary<ProjectPropertyInstance>((globalProperties == null) ? 0 : globalProperties.Count); 3411var importPaths = new List<string>(Math.Max(0, importClosure.Count - 1) /* outer project */); 3424var importPathsIncludingDuplicates = new List<string>(Math.Max(0, importClosureWithDuplicates.Count - 1) /* outer project */); 3474var multiDictionary = new MultiDictionary<string, ProjectItemInstance>(items.Count, StringComparer.OrdinalIgnoreCase); 3490var projectItemToInstanceMap = keepEvaluationCache ? new Dictionary<ProjectItem, ProjectItemInstance>(items.Count) : null; 3609_itemDefinitions = new RetrievableEntryHashSet<ProjectItemDefinitionInstance>(itemDefinitions.Count, MSBuildNameIgnoreCaseComparer.Default); 3622_properties = new PropertyDictionary<ProjectPropertyInstance>(properties.Count);
Instance\ProjectItemInstance.cs (13)
746inheritedItemDefinitions = (itemDefinitions == null) ? null : new List<ProjectItemDefinitionInstance>(itemDefinitions.Count + 1); 1109public bool HasCustomMetadata => _directMetadata?.Count > 0 || _itemDefinitions?.Count > 0; 1243if (_itemDefinitions == null || _itemDefinitions.Count == 0) 1248ImmutableDictionary<string, string> lastItemDefinition = _itemDefinitions[_itemDefinitions.Count - 1].BackingMetadata; 1251if (_itemDefinitions.Count == 1) 1262for (int i = _itemDefinitions.Count - 2; i >= 0; i--) 1543for (int i = 0; i < _itemDefinitions.Count; i++) 1687if (_itemDefinitions?.Count == 0) 1763int capacity = (_itemDefinitions?.Count ?? 0) + (_directMetadata?.Count ?? 0); 1768for (int i = 0; i < _itemDefinitions.Count; i++) 2108for (int i = 0; i < _itemDefinitions.Count; i++) 2132if (_itemDefinitions == null || _itemDefinitions.Count == 0) 2336itemDefinitionsClone ??= new List<ProjectItemDefinitionInstance>(source._taskItem._itemDefinitions.Count + 1);
Logging\BaseConsoleLogger.cs (1)
476if (environment == null || environment.Count == 0)
Logging\BinaryLogger\BuildEventArgsReader.cs (4)
1506if (properties == null || properties.Count == 0) 1511int count = properties.Count; 1642if (list.Count == 0) 1669if (list.Count == 0)
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
953count = genericList.Count;
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
276public virtual int GlobalPropertiesCount() => GlobalProperties.Count;
src\5057ed6cf5d6323b\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\697a1c9088572269\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\697a1c9088572269\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\8b3a4ac2431f87ea\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\8b3a4ac2431f87ea\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (5)
52for (int i = 0, count = list.Count; i < count; i++) 95if (items is ICollection<T> collection && collection.Count == 0) 288return genericCollection.Count == 0; 316return source.Count == 0; 828return (list.Count == 1) ? list[0] : default;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\msbuild\src\Shared\TaskHostBuildResponse.cs (3)
89if (engineResult.TargetOutputsPerProject is not null && engineResult.TargetOutputsPerProject.Count > 0) 91outputs = new List<Dictionary<string, TaskParameter>>(engineResult.TargetOutputsPerProject.Count); 95var dict = new Dictionary<string, TaskParameter>(projectOutputs?.Count ?? 0, StringComparer.OrdinalIgnoreCase);
src\msbuild\src\Shared\TypeLoader.cs (1)
665if (targetFrameworkAttr != null && targetFrameworkAttr.ConstructorArguments.Count > 0)
Utilities\Utilities.cs (1)
489var envPropertiesHashSet = new RetrievableValuedEntryHashSet<ProjectPropertyInstance>(environmentVariablesBag.Count + 2, MSBuildNameIgnoreCaseComparer.Default);
Microsoft.Build.Framework (22)
BackEnd\CommunicationsUtilities.cs (2)
353if (left is null || right is null || left.Count != right.Count)
BinaryTranslator.cs (9)
1220int count = list.Count; 1238int count = list.Count; 1263_writer.Write(collection.Count); 1470(dictionary is null ? 0 : dictionary.Count); 1515int count = dictionary.Count; 1538int count = dictionary.Count; 1563int count = dictionary.Count; 1606int count = dictionary.Count; 1628int count = dictionary.Count;
BuildException\BuildExceptionBase.cs (1)
103writer.Write(customKeyedSerializedData.Count);
Collections\ReadOnlyCollection.cs (1)
49return BackingCollection.Count;
ErrorUtilities.cs (2)
56ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, collection.Count, indexParamName); 58int capacity = collection.Count - index;
ProjectStartedEventArgs.cs (1)
481writer.Write(collection.Count);
ReuseableStringBuilder.cs (1)
147var separatorsRemaining = strings.Count - 1;
TaskItemData.cs (2)
52bool IMetadataContainer.HasCustomMetadata => Metadata.Count > 0; 61public int MetadataCount => Metadata.Count;
TelemetryEventArgs.cs (1)
31int count = Properties?.Count ?? 0;
Utilities\FileMatcher.cs (2)
986excludeNextSteps = new RecursiveStepResult[searchesToExclude.Count]; 987for (int i = 0; i < searchesToExclude.Count; i++)
Microsoft.Build.NuGetSdkResolver (2)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (3)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i) 375writer.Write(Properties.Count);
Microsoft.Build.Tasks.Core (10)
AssemblyDependency\ReferenceTable.cs (2)
1455if (!assemblyReference.IsPrimary || (assemblyReference.IsPrimary && isMarkedForExclusion && (dependees?.Count > 1))) 2077if (referenceAssemblyDirectories?.Count > 0)
GetInstalledSDKLocations.cs (2)
167if (installedSDKs?.Count > 0) 169Log.LogMessageFromResources(MessageImportance.Low, "GetInstalledSDKs.FoundSDKs", installedSDKs.Count);
GetReferenceAssemblyPaths.cs (4)
84var pathsToReturn = new string[_tfmPaths.Count]; 106string[] pathsToReturn = new string[_tfmPathsNoProfile.Count]; 216if (_tfmPaths?.Count > 0) 270if (pathsToReturn.Count == 0)
ManifestUtil\DeployManifest.cs (1)
143if (referenceAssemblyPaths?.Count > 0)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
235if (taskInfo.CodeType == RoslynCodeTaskFactoryCodeType.Class && parameterGroup.Count == 0)
Microsoft.Build.Utilities.Core (9)
SDKManifest.cs (1)
246private bool IsFrameworkExtensionSdkManifest => _frameworkIdentities?.Count > 0
ToolLocationHelper.cs (8)
2188if (pathsList?.Count > 0) 2198if (pathsList?.Count > 0) 2240&& dotNetFrameworkReferenceAssemblies.Count == 0) 2254for (int i = 0; i < dotNetFrameworkReferenceAssemblies.Count; i++) 3684if (frameworkVersions.Count > 0) 3686Version targetFrameworkVersion = ConvertTargetFrameworkVersionToVersion(frameworkVersions[frameworkVersions.Count - 1]); 3832if (versions.Count > 0) 3910if (refAssemblyPaths?.Count > 0)
Microsoft.CodeAnalysis (39)
Collections\CachingDictionary.cs (1)
95return this.EnsureFullyPopulated().Count;
Collections\CollectionsExtensions.cs (1)
15return collection == null || collection.Count == 0;
Collections\IdentifierCollection.Collection.cs (1)
45_count = this.IdentifierCollection._map.Values.Sum(o => o is string ? 1 : ((ISet<string>)o).Count);
Collections\UnionCollection.cs (4)
36if (coll1.Count == 0) 41if (coll2.Count == 0) 103index += collection.Count; 113_count = _collections.Sum(c => c.Count);
PEWriter\Miscellaneous.cs (2)
34return asIListT.Count != 0; 69return (uint)asIListT.Count;
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Syntax\LineDirectiveMap.cs (2)
141var entries = ArrayBuilder<LineMappingEntry>.GetInstance(directives.Count + 1); 146if (directives.Count > 0)
Syntax\SyntaxList`1.cs (1)
88var builder = (collection != null) ? new SyntaxListBuilder<TNode>(collection.Count) : SyntaxListBuilder<TNode>.Create();
Syntax\SyntaxTriviaList.cs (1)
332if (triviaCollection != null && triviaCollection.Count == 0)
Microsoft.CodeAnalysis.Analyzers (52)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (3)
64CodeGenerationNamespaceInfo.GetImports(innermostNamespace).Count == 0) 93for (var i = index; i < availableIndices.Count; i++) 200Contract.ThrowIfTrue(availableIndices != null && availableIndices.Count != declarationList.Count + 1);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
Microsoft.CodeAnalysis.AnalyzerUtilities (49)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
2093=> dict1.Count == dict2.Count &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.CodeStyle (44)
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
127return (missingCases: missingEnumMembers.Count > 0, missingDefaultCase: !HasDefaultCase(operation));
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
176if (documentsUpdated.Count != 1)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
186.Skip(reservedNames.Count)];
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
100if (commonTypes.Count == 0) 105if (commonTypes.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (3)
64CodeGenerationNamespaceInfo.GetImports(innermostNamespace).Count == 0) 93for (var i = index; i < availableIndices.Count; i++) 200Contract.ThrowIfTrue(availableIndices != null && availableIndices.Count != declarationList.Count + 1);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
Microsoft.CodeAnalysis.CSharp (13)
BoundTree\VariablePendingInference.cs (1)
96Debug.Assert(inferenceDiagnostics.DependenciesBag.Count == 0);
Compilation\CSharpCompilation.cs (1)
2816if (_lazyUsedAssemblyReferences?.IsEmpty == false || diagnostics.DependenciesBag.Count != 0)
Compilation\SyntaxAndDeclarationManager.cs (3)
182ordinalMapBuilder.Add(tree, ordinalMapBuilder.Count); 574Debug.Assert(oldLoadDirectives.Length == newLoadDirectivesSyntax.Count); 713ordinalMapBuilder.Add(tree, ordinalMapBuilder.Count);
Declarations\DeclarationTreeBuilder.cs (2)
309if (directiveNodes.Count == 0) 314var directives = ArrayBuilder<ReferenceDirective>.GetInstance(directiveNodes.Count);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
433if (implementedEvents.Count != 0)
Symbols\Source\TypeParameterBuilder.cs (2)
56var arrayBuilder = ArrayBuilder<Location>.GetInstance(builders.Count); 67var arrayBuilder = ArrayBuilder<SyntaxReference>.GetInstance(builders.Count);
Symbols\Symbol.cs (1)
1048if (diagnostics.DiagnosticBag?.IsEmptyWithoutResolution == false || diagnostics.DependenciesBag?.Count > 0)
Syntax\SyntaxFactory.cs (2)
1391if (collection != null && collection.Count == 0) 1410var builder = new SeparatedSyntaxListBuilder<TNode>(collection != null ? collection.Count : 3);
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
375if (result.GetTextChanges(cancellationToken).Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
60for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 69return xNameParts.Count - yNameParts.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
165for (var i = 0; i < list.Count - 1; i++) 178for (var i = 1; i < list.Count; i++)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
650if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
Microsoft.CodeAnalysis.CSharp.Features (7)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
177if (conflictReferences.Count == 0)
Organizing\Organizers\MemberDeclarationsOrganizer.cs (4)
44Debug.Assert(originalList.Count == finalList.Count); 46if (originalList.Count >= 2) 112if (members.Count > 1)
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
169for (var i = 0; i < namedParameters.Count; i++)
Snippets\CSharpConstructorSnippetProvider.cs (1)
46precedingModifiers.Count == 1 && precedingModifiers.Single() == SyntaxKind.StaticKeyword))
Microsoft.CodeAnalysis.CSharp.Workspaces (18)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
375if (result.GetTextChanges(cancellationToken).Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
60for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 69return xNameParts.Count - yNameParts.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
165for (var i = 0; i < list.Count - 1; i++) 178for (var i = 1; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
650if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
Microsoft.CodeAnalysis.Extensions.Package (29)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.Features (27)
CodeFixes\Service\CodeFixService.cs (2)
958var builder = new FixedSizeArrayBuilder<IConfigurationFixProvider>(orderedLanguageKindAndFixers.Count); 976for (var i = 0; i < fixers.Count; i++)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (2)
165if (textChanges.Count == 0) 175textChanges.RemoveAt(textChanges.Count - 1);
Completion\CompletionService.cs (1)
337if (builder.Count == 0)
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
81inferredTypes.Count > 0 &&
Debugging\AbstractBreakpointResolver.cs (1)
127switch (nameParts.Count)
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (2)
134if (projectAnalyzers.Count == 0) 139if (projectAnalyzers.Count == analyzers.Length)
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (1)
232for (var i = 0; i < lines.Count; i++)
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
245if (finalFieldName != field.Name && constructorLocations.Count > 0)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
591public bool HasMultipleDocuments => _solutionId != null || _projectOrDocumentIds?.Count > 1;
ExtractMethod\MethodExtractor.Analyzer.cs (1)
249var variableMapStatus = failedVariables.Count == 0
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
253if (folders != null && folders.Count != 0)
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (2)
139if (_state.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface || argumentList.Count == 0) 199for (var i = 0; i < parameterNames.Count; i++)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AnonymousTypes.cs (1)
41if (typeDisplayInfo.TypesParts.Count > 0)
RQName\SimpleTree\SimpleGroupNode.cs (1)
20public int Count { get { return Children.Count; } }
SignatureHelp\AbstractSignatureHelpProvider.cs (2)
39if (items is null || items.Count == 0 || state == null) 195if (info.TypesParts.Count > 0)
SignatureHelp\SignatureHelpItems.cs (2)
71Contract.ThrowIfTrue(selectedItem.HasValue && selectedItem.Value >= items.Count); 78if (selectedItem.HasValue && items.Count != distinctItems.Count)
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
127return (missingCases: missingEnumMembers.Count > 0, missingDefaultCase: !HasDefaultCase(operation));
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
176if (documentsUpdated.Count != 1)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
186.Skip(reservedNames.Count)];
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
100if (commonTypes.Count == 0) 105if (commonTypes.Count == 0)
Microsoft.CodeAnalysis.NetAnalyzers (8)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposable.cs (1)
70if (disposableFields.Count == 0)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
121return collectionoft.Count == count; 158return collectionoft.Count > count; 195return collectionoft.Count < count;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
330/// - <see cref="System.Collections.Generic.ICollection{T}.Count"/>
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (1)
353if (set1.Length > set2.Count)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
2090=> dict1.Count == dict2.Count &&
Microsoft.CodeAnalysis.Razor.Compiler (8)
Language\Components\ComponentInjectDirectivePass.cs (1)
26for (var i = visitor.Directives.Count - 1; i >= 0; i--)
Language\DefaultDocumentClassifierPass.cs (3)
27for (var i = 0; i < configuration.ConfigureClass.Count; i++) 33for (var i = 0; i < configuration.ConfigureNamespace.Count; i++) 39for (var i = 0; i < configuration.ConfigureMethod.Count; i++)
Language\DirectiveDescriptor.cs (1)
219for (var i = 0; i < Tokens.Count; i++)
Language\Legacy\KeywordSet.cs (1)
10public int Count => set.Count;
Mvc\InjectDirective.cs (1)
65for (var i = visitor.Directives.Count - 1; i >= 0; i--)
Mvc\ModelDirective.cs (1)
52for (var i = visitor.ModelDirectives.Count - 1; i >= 0; i--)
Microsoft.CodeAnalysis.ResxSourceGenerator (47)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.Workspaces (51)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
283using var _ = ArrayBuilder<KeyValuePair<object, AnalyzerReference>>.GetInstance(source.Count, out var builder);
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
161var result = ArrayBuilder<ISymbol>.GetInstance(array.Count);
Log\AggregateLogger.cs (1)
101if (set.Count == 1)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (3)
64CodeGenerationNamespaceInfo.GetImports(innermostNamespace).Count == 0) 93for (var i = index; i < availableIndices.Count; i++) 200Contract.ThrowIfTrue(availableIndices != null && availableIndices.Count != declarationList.Count + 1);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
AbstractBuildHost.cs (1)
180Logger.LogInformation($"Loading an in-memory project with the path {projectFilePath} ({globalProperties?.Count ?? 0} global properties)");
Build\ProjectBuildManager.cs (2)
130if (loadedProjects.Count > 0) 132Debug.Assert(loadedProjects.Count == 1);
MSBuild\ProjectFile\Extensions.cs (3)
53var references = new HashSet<PackageReferenceItem>(capacity: packageReferenceItems.Count); 118if (items.Count == 0) 121if (items.Count == 1)
Microsoft.CSharp (10)
Microsoft\CSharp\RuntimeBinder\ComInterop\CollectionExtensions.cs (4)
20T[] res = new T[list.Count + 1]; 28T[] res = new T[list.Count]; 35T[] res = new T[list.Count + 1]; 37res[list.Count] = item;
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (4)
89if (results == null || results.Count == 0) 92if (results == null || results.Count == 0) 97DynamicProperty[] pairArray = new DynamicProperty[results.Count]; 98for (int i = 0; i < results.Count; i++)
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (2)
346return (da.TransformFlags.Count == 0 || (da.TransformFlags.Count == 1 && da.TransformFlags[0]));
Microsoft.Data.Analysis (178)
DataFrame.cs (3)
424for (int b = 0; b < buffers.Count; b++) 444for (int b = 0; b < buffers.Count; b++) 483if (values.Count != Columns.Count)
DataFrame.IO.cs (1)
123var columnsCount = columnInfos.Count;
DataFrameColumns\ArrowStringDataFrameColumn.cs (9)
83Debug.Assert(_nullBitMapBuffers.Count > bitMapIndex); 99Debug.Assert(_nullBitMapBuffers.Count > bitMapIndex); 143for (int i = 0; i < _dataBuffers.Count; i++) 157for (int i = 0; i < _nullBitMapBuffers.Count; i++) 171for (int i = 0; i < _offsetsBuffers.Count; i++) 183if (_dataBuffers.Count == 0) 189DataFrameBuffer<int> mutableOffsetsBuffer = (DataFrameBuffer<int>)_offsetsBuffers[_offsetsBuffers.Count - 1]; 201DataFrameBuffer<byte> mutableDataBuffer = (DataFrameBuffer<byte>)_dataBuffers[_dataBuffers.Count - 1]; 229int numBuffers = _offsetsBuffers.Count;
DataFrameColumns\StringDataFrameColumn.cs (3)
346for (int b = 0; b < mapIndices.ColumnContainer.Buffers.Count; b++) 368for (int b = 0; b < mapIndices.ColumnContainer.Buffers.Count; b++) 391counts.Append(keyValuePair.Value.Count);
DataFrameColumns\VBufferDataFrameColumn.cs (2)
232for (int b = 0; b < mapIndices.ColumnContainer.Buffers.Count; b++) 254for (int b = 0; b < mapIndices.ColumnContainer.Buffers.Count; b++)
DateTimeComputation.cs (4)
33for (int b = 0; b < column.Buffers.Count; b++) 105for (int b = 0; b < column.Buffers.Count; b++) 199for (int b = 0; b < column.Buffers.Count; b++) 256for (int b = 0; b < column.Buffers.Count; b++)
GroupBy.cs (2)
300int numberOfValues = values.Count; 486retColumn[rowIndex] = (double)Convert.ChangeType(_dataFrame.Columns[columnIndex].Sum(rowEnumerable), typeof(double)) / rowEnumerable.Count;
PrimitiveColumnContainer.BinaryOperations.cs (6)
20for (int i = 0; i < this.Buffers.Count; i++) 61for (int i = 0; i < this.Buffers.Count; i++) 74for (int i = 0; i < this.Buffers.Count; i++) 98for (int i = 0; i < this.Buffers.Count; i++) 115for (int i = 0; i < this.Buffers.Count; i++) 157for (int i = 0; i < this.Buffers.Count; i++)
PrimitiveColumnContainer.cs (16)
115if (Buffers.Count == 0) 121if (Buffers[Buffers.Count - 1].Length == ReadOnlyDataFrameBuffer<T>.MaxCapacity) 127DataFrameBuffer<T> mutableLastBuffer = Buffers.GetOrCreateMutable(Buffers.Count - 1); 143if (Buffers.Count == 0) 149if (Buffers[Buffers.Count - 1].Length == ReadOnlyDataFrameBuffer<T>.MaxCapacity) 155DataFrameBuffer<T> mutableLastBuffer = Buffers.GetOrCreateMutable(Buffers.Count - 1); 156DataFrameBuffer<byte> lastNullBitMapBuffer = NullBitMapBuffers.GetOrCreateMutable(NullBitMapBuffers.Count - 1); 181for (int b = 0; b < Buffers.Count; b++) 199for (int b = 0; b < Buffers.Count; b++) 218for (int b = 0; b < Buffers.Count; b++) 242for (int b = 0; b < Buffers.Count; b++) 315Debug.Assert(NullBitMapBuffers.Count > bitMapIndex); 335Debug.Assert(NullBitMapBuffers.Count > bitMapIndex); 465if (Buffers.Count == 0) 475for (int b = 0; b < mapIndices.Buffers.Count; b++) 479index = mapIndices.Buffers.Count - 1 - b;
PrimitiveDataFrameColumn.cs (5)
64for (int i = 0; i < _columnContainer.Buffers.Count; i++) 77for (int i = 0; i < _columnContainer.NullBitMapBuffers.Count; i++) 365for (int b = 0; b < ColumnContainer.NullBitMapBuffers.Count; b++) 389counts.Append(keyValuePair.Value.Count); 619for (int b = 0; b < _columnContainer.Buffers.Count; b++)
PrimitiveDataFrameColumn.Sort.cs (3)
25List<List<int>> bufferSortIndices = new List<List<int>>(_columnContainer.Buffers.Count); 29for (int b = 0; b < _columnContainer.Buffers.Count; b++) 83for (int i = 0; i < buffers.Count; i++)
PrimitiveDataFrameColumnComputations.cs (122)
125for (int b = 0; b < column.Buffers.Count; b++) 143for (int b = 0; b < column.Buffers.Count; b++) 248for (int b = 0; b < column.Buffers.Count; b++) 274for (int b = 0; b < column.Buffers.Count; b++) 338for (int b = 0; b < column.Buffers.Count; b++) 402for (int b = 0; b < column.Buffers.Count; b++) 466for (int b = 0; b < column.Buffers.Count; b++) 531for (int b = 0; b < column.Buffers.Count; b++) 579for (int b = 0; b < column.Buffers.Count; b++) 626for (int b = 0; b < column.Buffers.Count; b++) 671for (int b = 0; b < column.Buffers.Count; b++) 717for (int b = 0; b < column.Buffers.Count; b++) 735for (int b = 0; b < column.Buffers.Count; b++) 761for (int b = 0; b < column.Buffers.Count; b++) 825for (int b = 0; b < column.Buffers.Count; b++) 889for (int b = 0; b < column.Buffers.Count; b++) 953for (int b = 0; b < column.Buffers.Count; b++) 1018for (int b = 0; b < column.Buffers.Count; b++) 1066for (int b = 0; b < column.Buffers.Count; b++) 1113for (int b = 0; b < column.Buffers.Count; b++) 1158for (int b = 0; b < column.Buffers.Count; b++) 1204for (int b = 0; b < column.Buffers.Count; b++) 1222for (int b = 0; b < column.Buffers.Count; b++) 1248for (int b = 0; b < column.Buffers.Count; b++) 1312for (int b = 0; b < column.Buffers.Count; b++) 1376for (int b = 0; b < column.Buffers.Count; b++) 1440for (int b = 0; b < column.Buffers.Count; b++) 1505for (int b = 0; b < column.Buffers.Count; b++) 1553for (int b = 0; b < column.Buffers.Count; b++) 1600for (int b = 0; b < column.Buffers.Count; b++) 1645for (int b = 0; b < column.Buffers.Count; b++) 1691for (int b = 0; b < column.Buffers.Count; b++) 1709for (int b = 0; b < column.Buffers.Count; b++) 1735for (int b = 0; b < column.Buffers.Count; b++) 1799for (int b = 0; b < column.Buffers.Count; b++) 1863for (int b = 0; b < column.Buffers.Count; b++) 1927for (int b = 0; b < column.Buffers.Count; b++) 1992for (int b = 0; b < column.Buffers.Count; b++) 2040for (int b = 0; b < column.Buffers.Count; b++) 2087for (int b = 0; b < column.Buffers.Count; b++) 2132for (int b = 0; b < column.Buffers.Count; b++) 2178for (int b = 0; b < column.Buffers.Count; b++) 2196for (int b = 0; b < column.Buffers.Count; b++) 2222for (int b = 0; b < column.Buffers.Count; b++) 2286for (int b = 0; b < column.Buffers.Count; b++) 2350for (int b = 0; b < column.Buffers.Count; b++) 2414for (int b = 0; b < column.Buffers.Count; b++) 2479for (int b = 0; b < column.Buffers.Count; b++) 2527for (int b = 0; b < column.Buffers.Count; b++) 2574for (int b = 0; b < column.Buffers.Count; b++) 2619for (int b = 0; b < column.Buffers.Count; b++) 2665for (int b = 0; b < column.Buffers.Count; b++) 2683for (int b = 0; b < column.Buffers.Count; b++) 2709for (int b = 0; b < column.Buffers.Count; b++) 2773for (int b = 0; b < column.Buffers.Count; b++) 2837for (int b = 0; b < column.Buffers.Count; b++) 2901for (int b = 0; b < column.Buffers.Count; b++) 2966for (int b = 0; b < column.Buffers.Count; b++) 3014for (int b = 0; b < column.Buffers.Count; b++) 3061for (int b = 0; b < column.Buffers.Count; b++) 3106for (int b = 0; b < column.Buffers.Count; b++) 3152for (int b = 0; b < column.Buffers.Count; b++) 3170for (int b = 0; b < column.Buffers.Count; b++) 3196for (int b = 0; b < column.Buffers.Count; b++) 3260for (int b = 0; b < column.Buffers.Count; b++) 3324for (int b = 0; b < column.Buffers.Count; b++) 3388for (int b = 0; b < column.Buffers.Count; b++) 3453for (int b = 0; b < column.Buffers.Count; b++) 3501for (int b = 0; b < column.Buffers.Count; b++) 3548for (int b = 0; b < column.Buffers.Count; b++) 3593for (int b = 0; b < column.Buffers.Count; b++) 3639for (int b = 0; b < column.Buffers.Count; b++) 3657for (int b = 0; b < column.Buffers.Count; b++) 3683for (int b = 0; b < column.Buffers.Count; b++) 3747for (int b = 0; b < column.Buffers.Count; b++) 3811for (int b = 0; b < column.Buffers.Count; b++) 3875for (int b = 0; b < column.Buffers.Count; b++) 3940for (int b = 0; b < column.Buffers.Count; b++) 3988for (int b = 0; b < column.Buffers.Count; b++) 4035for (int b = 0; b < column.Buffers.Count; b++) 4080for (int b = 0; b < column.Buffers.Count; b++) 4126for (int b = 0; b < column.Buffers.Count; b++) 4144for (int b = 0; b < column.Buffers.Count; b++) 4170for (int b = 0; b < column.Buffers.Count; b++) 4234for (int b = 0; b < column.Buffers.Count; b++) 4298for (int b = 0; b < column.Buffers.Count; b++) 4362for (int b = 0; b < column.Buffers.Count; b++) 4427for (int b = 0; b < column.Buffers.Count; b++) 4475for (int b = 0; b < column.Buffers.Count; b++) 4522for (int b = 0; b < column.Buffers.Count; b++) 4567for (int b = 0; b < column.Buffers.Count; b++) 4613for (int b = 0; b < column.Buffers.Count; b++) 4631for (int b = 0; b < column.Buffers.Count; b++) 4657for (int b = 0; b < column.Buffers.Count; b++) 4721for (int b = 0; b < column.Buffers.Count; b++) 4785for (int b = 0; b < column.Buffers.Count; b++) 4849for (int b = 0; b < column.Buffers.Count; b++) 4914for (int b = 0; b < column.Buffers.Count; b++) 4962for (int b = 0; b < column.Buffers.Count; b++) 5009for (int b = 0; b < column.Buffers.Count; b++) 5054for (int b = 0; b < column.Buffers.Count; b++) 5100for (int b = 0; b < column.Buffers.Count; b++) 5118for (int b = 0; b < column.Buffers.Count; b++) 5144for (int b = 0; b < column.Buffers.Count; b++) 5208for (int b = 0; b < column.Buffers.Count; b++) 5272for (int b = 0; b < column.Buffers.Count; b++) 5336for (int b = 0; b < column.Buffers.Count; b++) 5401for (int b = 0; b < column.Buffers.Count; b++) 5449for (int b = 0; b < column.Buffers.Count; b++) 5496for (int b = 0; b < column.Buffers.Count; b++) 5541for (int b = 0; b < column.Buffers.Count; b++) 5587for (int b = 0; b < column.Buffers.Count; b++) 5605for (int b = 0; b < column.Buffers.Count; b++) 5631for (int b = 0; b < column.Buffers.Count; b++) 5695for (int b = 0; b < column.Buffers.Count; b++) 5759for (int b = 0; b < column.Buffers.Count; b++) 5823for (int b = 0; b < column.Buffers.Count; b++) 5888for (int b = 0; b < column.Buffers.Count; b++) 5936for (int b = 0; b < column.Buffers.Count; b++) 5983for (int b = 0; b < column.Buffers.Count; b++) 6028for (int b = 0; b < column.Buffers.Count; b++) 6074for (int b = 0; b < column.Buffers.Count; b++)
StringDataFrameColumn.BinaryOperations.cs (2)
46int bufferLen = buffer.Count; 61int bufferLen = buffer.Count;
Microsoft.Diagnostics.DataContractReader (1)
_generated\13\ContractDescriptorContext.g.cs (1)
73for (int i = 0; i < options.Converters.Count; i++)
Microsoft.DotNet.ApiCompatibility (2)
Rules\AttributesMustMatch.cs (1)
304for (int i = 0; i < attributes.Count; i++)
Runner\ApiCompatRunner.cs (1)
38List<IEnumerable<ElementContainer<IAssemblySymbol>>> rightContainersList = new(workItem.Right.Count);
Microsoft.DotNet.Build.Tasks.Packaging (1)
CreateTrimDependencyGroups.cs (1)
128if (newDependencyGroup.Packages.Count == 0)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Swix\SwixPackageBase.cs (1)
19public bool HasDependencies => Dependencies.Count > 0;
Microsoft.DotNet.Cli.Definitions (3)
_generated\3\GlobalJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
Help\HelpBuilder.cs (2)
335var sb = new StringBuilder(arguments.Count * 100); 339for (var i = 0; i < arguments.Count; i++)
Microsoft.DotNet.Cli.Telemetry (1)
_generated\21\TelemetryJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Microsoft.DotNet.Cli.Utils (2)
Extensions\MSBuildProjectExtensions.cs (2)
14return el.ConditionChain().Count == 0; 18return condChain.Count == 1 && condChain.First().Trim() == conditionStr;
Microsoft.DotNet.GenFacades (1)
SourceGenerator.cs (1)
79else if (seedTypes.Count > 1)
Microsoft.DotNet.HotReload.WebAssembly.Browser (2)
_generated\9\WebAssemblyHotReloadJsonSerializerContext.g.cs (1)
68for (int i = 0; i < options.Converters.Count; i++)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
166if (ctorArgs.Count != 1 ||
Microsoft.DotNet.ProjectTools (1)
_generated\5\LaunchProfileJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
Microsoft.DotNet.TemplateLocator (3)
_generated\11\InstallStateJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\3\WorkloadSetJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (1)
29if (UnsortedSuggestions.Count == 0)
Microsoft.Extensions.AI (41)
ChatCompletion\ChatResponse{T}.cs (2)
126var json = Messages.Count > 0 ? Messages[Messages.Count - 1].Text : string.Empty;
ChatCompletion\FunctionInvokingChatClient.cs (18)
556int contentsCount = contents.Count; 807if (toolList?.Count is int count && count > 0) 852if (toolList?.Count > 0) 892int count = messages.Count; 906int count = content.Count; 928int messageCount = messages.Count; 932int contentCount = contents.Count; 951int contentCount = contents.Count; 981int contentCount = contents.Count; 1057if (options?.Tools is not { Count: > 0 }) 1075if (remainingCount < options.Tools.Count) 1258if (messages is not { Count: > 0 }) 1447for (int j = 0; j < message.Contents.Count; j++) 1477if (keptContents?.Count != message.Contents.Count) 1704if (content is { Count: > 0 }) 1706for (int i = 0; i < content.Count; i++) 1748for (int i = 0; i < messages.Count; i++) 1751for (int j = 0; j < content.Count; j++)
ChatCompletion\ImageGeneratingChatClient.cs (7)
171for (int contentIndex = 0; contentIndex < message.Contents.Count; contentIndex++) 247if (options?.Tools is null || options.Tools.Count == 0) 254for (int i = 0; i < tools.Count; i++) 323for (int i = 0; i < contents.Count; i++) 385if (response.Contents.Count == 0) 448if (response.Contents.Count == 0) 474var newList = new List<T>(original.Count + additionalCapacity);
ChatCompletion\OpenTelemetryChatClient.cs (2)
336if (options.StopSequences is IList<string> { Count: > 0 } stopSequences) 369if (options.Tools is { Count: > 0 })
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
232response.Contents is { Count: > 0 } contents &&
ChatReduction\SummarizingChatReducer.cs (2)
147var earliestAllowedIndex = unsummarizedMessages.Count - thresholdCount - targetCount; 155var indexOfFirstMessageToKeep = unsummarizedMessages.Count - targetCount;
Embeddings\CachingEmbeddingGenerator.cs (1)
36switch (valuesList.Count)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\OtelContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Realtime\OpenTelemetryRealtimeClientSession.cs (3)
391if (responseCreateMsg.Items is { Count: > 0 } items) 473case ResponseCreatedRealtimeServerMessage responseCreatedMsg when responseCreatedMsg.Items is { Count: > 0 }: 515if (item?.Contents is null or { Count: 0 })
Microsoft.Extensions.AI.Abstractions (38)
ChatCompletion\ChatMessage.cs (2)
117_contents is { Count: > 0 } ? _contents[0] : 124private string EllipsesForDebuggerDisplay => _contents is { Count: > 1 } ? ", ..." : string.Empty;
ChatCompletion\ChatResponse.cs (1)
138int messageCount = _messages?.Count ?? 0;
ChatCompletion\ChatResponseExtensions.cs (15)
64if (updates is ICollection<ChatResponseUpdate> { Count: 0 }) 88if (contentsList.Count > 0) 197for (int i = 0; i < contents.Count; i++) 238for (int i = 0; i < contents.Count; i++) 256Queries = webSearchCall.Queries is not { Count: > 0 } ? existing.Queries : 257existing.Queries is not { Count: > 0 } ? webSearchCall.Queries : 444while (start < contents.Count) 455while (i < contents.Count && TryAsCoalescable(contents[i], out TContent? next) && (canMerge is null || canMerge(prev, next))) 481if (content is TContent tmp && tmp.Annotations is not { Count: > 0 }) 507int contentsCount = contents.Count; 521Debug.Assert(nextSlot == contents.Count, "Expected final count to equal list length."); 528int count = response.Messages.Count; 543if (response.Messages.Count != 0) 545var lastMessage = response.Messages[response.Messages.Count - 1]; 561message = response.Messages[response.Messages.Count - 1];
ChatCompletion\ChatResponseUpdate.cs (2)
184_contents is { Count: > 0 } ? _contents[0] : 191private string EllipsesForDebuggerDisplay => _contents is { Count: > 1 } ? ", ..." : string.Empty;
Contents\AIContentExtensions.cs (2)
23int count = list.Count; 66int count = messages.Count;
Embeddings\EmbeddingGeneratorExtensions.cs (1)
186int inputsCount = inputs.Count;
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIAnnotation.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIContent.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAnnotatedRegion.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListChatMessage.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContextNoIndentation.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
HostedMcpServerToolRequireSpecificApprovalMode.cs (1)
66for (int i = 0; i < list.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (3)
51attribute.ConstructorArguments.Count == 1) 307attribute.ConstructorArguments.Count == 1) 399attribute.ConstructorArguments.Count == 1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Abstractions.Tests (85)
AssertExtensions.cs (5)
30Assert.Equal(expectedMessage.Contents.Count, chatMessage.Contents.Count); 31for (int j = 0; j < expectedMessage.Contents.Count; j++) 119if (expected.Count != actual.Count)
ChatCompletion\ChatMessageTests.cs (4)
105Assert.Equal(messageCount, message.Contents.Count); 294Assert.Equal(items.Count, deserializedMessage.Contents.Count); 382Assert.Equal(3, result.Contents.Count);
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (14)
94Assert.Equal(9, response.Messages.Count); 158Assert.Equal(4, response.Messages.Count); 208Assert.Equal(5, response.Messages.Count); 295Assert.Equal(2, response.Messages.Count); 330Assert.Equal(2, response.Messages.Count); 398Assert.Equal(2, response.Messages.Count); 435Assert.Equal(3, response.Messages.Count); 471Assert.Equal(3, response.Messages.Count); 567Assert.Equal(4, response.Messages.Count); 672Assert.Equal(expected.Count + (gapLength * ((numSequences - 1) + (gapBeginningEnd ? 2 : 0))), message.Contents.Count); 709Assert.Equal(8, message.Contents.Count); 739Assert.Equal(5, message.Contents.Count); 784Assert.Equal(12, message.Contents.Count); 953Assert.Equal(4, message.Contents.Count);
ChatCompletion\ChatResponseUpdateTests.cs (5)
142Assert.Equal(5, result.Contents.Count); 206Assert.Equal(5, result.Contents.Count); 396Assert.Equal(2, original.Contents.Count); 397Assert.Equal(2, clone.Contents.Count); 438Assert.Equal(2, result.Contents.Count);
Contents\AIContentTests.cs (3)
105Assert.Equal(message.Contents.Count, deserialized.Contents.Count); 106for (int i = 0; i < message.Contents.Count; i++)
Contents\CodeInterpreterToolCallContentTests.cs (2)
59Assert.Equal(3, c.Inputs.Count); 83Assert.Equal(2, deserializedSut.Inputs.Count);
Contents\CodeInterpreterToolResultContentTests.cs (2)
60Assert.Equal(4, c.Outputs.Count); 85Assert.Equal(2, deserializedSut.Outputs.Count);
Contents\FunctionCallContentTests.cs (1)
353Assert.Equal(5, content.Arguments.Count);
Contents\ImageGenerationToolResultContentTests.cs (3)
60Assert.Equal(3, c.Outputs.Count); 84Assert.Equal(2, deserializedSut.Outputs.Count); 115Assert.Equal(2, imageResult.Outputs.Count);
Contents\ToolCallContentTests.cs (3)
77Assert.Equal(message.Contents.Count, deserialized2.Contents.Count); 78for (int i = 0; i < message.Contents.Count; i++)
Contents\ToolResultContentTests.cs (3)
76Assert.Equal(message.Contents.Count, deserialized2.Contents.Count); 77for (int i = 0; i < message.Contents.Count; i++)
Contents\WebSearchToolCallContentTests.cs (1)
30Assert.Equal(2, c.Queries.Count);
Contents\WebSearchToolResultContentTests.cs (2)
63Assert.Equal(3, c.Outputs.Count); 93Assert.Equal(2, deserialized.Outputs.Count);
Functions\AIFunctionArgumentsTests.cs (5)
115Assert.Equal(2, args.Count); 139Assert.Equal(3, args.Count); 144Assert.Equal(4, args.Count); 149Assert.Equal(3, args.Count); 164Assert.Equal(2, args.Count);
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAIAnnotation.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAIContent.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAnnotatedRegion.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListChatMessage.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Context.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIAnnotation.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAnnotatedRegion.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.IListString.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
Image\ImageGenerationResponseTests.cs (3)
45Assert.Equal(contentCount, response.Contents.Count); 110Assert.Equal(2, deserialized.Contents.Count); 148Assert.Equal(3, deserialized.Contents.Count);
SpeechToText\SpeechToTextResponseTests.cs (4)
89Assert.Equal(contentCount, response.Contents.Count); 169Assert.Equal(4, result.Contents.Count); 171for (int i = 0; i < original.Contents.Count; i++) 235Assert.Equal(withUsage ? 4 : 3, update.Contents.Count);
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (1)
124Assert.Equal(expected.Count + (gapLength * ((numSequences - 1) + (gapBeginningEnd ? 2 : 0))), response.Contents.Count);
SpeechToText\SpeechToTextResponseUpdateTests.cs (3)
106Assert.Equal(original.Contents.Count, result.Contents.Count); 107for (int i = 0; i < original.Contents.Count; i++)
TextToSpeech\TextToSpeechResponseTests.cs (2)
53Assert.Equal(contentCount, response.Contents.Count); 162Assert.Equal(withUsage ? 3 : 2, update.Contents.Count);
TextToSpeech\TextToSpeechResponseUpdateExtensionsTests.cs (2)
46Assert.Equal(3, response.Contents.Count); 71Assert.Equal(2, response.Contents.Count);
TextToSpeech\TextToSpeechResponseUpdateTests.cs (2)
63Assert.Equal(original.Contents.Count, result.Contents.Count);
Tools\HostedCodeInterpreterToolTests.cs (1)
53Assert.Equal(2, tool.Inputs.Count);
Tools\HostedFileSearchToolTests.cs (1)
55Assert.Equal(2, tool.Inputs.Count);
Tools\HostedMcpServerToolTests.cs (1)
116Assert.Equal(2, tool.Headers.Count);
Tools\HostedToolSearchToolTests.cs (1)
51Assert.Equal(2, tool.DeferredTools.Count);
Microsoft.Extensions.AI.Evaluation (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Console (2)
Commands\ReportCommand.cs (1)
197[PropertyNames.MetricsCount] = metrics.Count.ToTelemetryPropertyValue()
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (27)
AgentQualityEvaluatorTests.cs (4)
101Assert.Equal(2, result.Metrics.Count); 134Assert.Equal(2, result.Metrics.Count); 157Assert.Equal(3, result.Metrics.Count); 197Assert.Equal(3, result.Metrics.Count);
NLPEvaluatorTests.cs (4)
63Assert.Equal(3, result.Metrics.Count); 90Assert.Equal(3, result.Metrics.Count); 116Assert.Equal(3, result.Metrics.Count); 137Assert.Equal(3, result.Metrics.Count);
QualityEvaluatorTests.cs (8)
100Assert.Equal(6, result.Metrics.Count); 141Assert.Equal(6, result.Metrics.Count); 178Assert.Equal(4, result.Metrics.Count); 252Assert.Equal(4, result.Metrics.Count); 259groundedness.Context?.Count is 1 && 264equivalence.Context?.Count is 1 && 269completeness.Context?.Count is 1 && 274retrieval.Context?.Count is 1 &&
SafetyEvaluatorTests.cs (11)
215Assert.Equal(6, result.Metrics.Count); 224groundednessPro.Context?.Count is 1 && 229ungroundedAttributes.Context?.Count is 1 && 306Assert.Equal(6, result.Metrics.Count); 315groundednessPro.Context?.Count is 1 && 320ungroundedAttributes.Context?.Count is 1 && 351Assert.Equal(7, result.Metrics.Count); 387Assert.Equal(7, result.Metrics.Count); 436Assert.Equal(7, result.Metrics.Count); 498Assert.Equal(7, result.Metrics.Count); 608Assert.Equal(5, result.Metrics.Count);
Microsoft.Extensions.AI.Evaluation.NLP (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Quality (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\SerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (1)
71for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIAnnotation.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIContent.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAnnotatedRegion.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListChatMessage.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListChatTurnDetails.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListEvaluationDiagnostic.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListScenarioRunResult.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (9)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (1)
71for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIAnnotation.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAIContent.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListAnnotatedRegion.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListChatMessage.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListChatTurnDetails.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListEvaluationDiagnostic.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (8)
ScenarioRunResultTests.cs (8)
349Assert.Equal(first!.Metrics.Count, second!.Metrics.Count); 385Assert.Equal(metric.Context.Count, deserializedMetric.Context.Count); 401Assert.Equal(metric.Metadata.Count, deserializedMetric.Metadata.Count); 455if (x?.Contents.Count != y?.Contents.Count)
Microsoft.Extensions.AI.Evaluation.Safety (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Integration.Tests (4)
ImageGeneratorIntegrationTests.cs (1)
78Assert.Equal(2, response.Contents.Count);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
PromptBasedFunctionCallingChatClient.cs (2)
47if (options?.Tools is { Count: > 0 }) 67for (var itemIndex = 0; itemIndex < message.Contents.Count; itemIndex++)
Microsoft.Extensions.AI.OpenAI (30)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\OpenAIJsonContext.g.cs (1)
60for (int i = 0; i < options.Converters.Count; i++)
OpenAIAssistantsChatClient.cs (5)
282if (textUpdate.Contents.Count == 0) 360if (options.Tools is { Count: > 0 } tools) 368if (runOptions.ToolsOverride.Count == 0) 392if (codeInterpreterTool.Inputs?.Count is > 0) 417if (fileSearchTool.Inputs is { Count: > 0 } fileSearchInputs)
OpenAIChatClient.cs (4)
625if (options.StopSequences is { Count: > 0 } stopSequences) 633if (options.Tools is { Count: > 0 } tools) 654if (result.Tools.Count > 0) 659if (result.ToolChoice is null && result.Tools.Count > 0)
OpenAIRealtimeClientSession.cs (8)
579if (mcpTool.AllowedTools is { Count: > 0 }) 606if (mode.AlwaysRequireApprovalToolNames is { Count: > 0 }) 615if (mode.NeverRequireApprovalToolNames is { Count: > 0 }) 629if (contentItem?.Contents is null or { Count: 0 }) 894if (session.OutputModalities is { Count: > 0 } modalities) 948if (response.Metadata is { Count: > 0 } metadata) 959if (response.OutputModalities is { Count: > 0 } modalities) 977if (response.OutputItems is { Count: > 0 } outputItems)
OpenAIResponsesChatClient.cs (11)
587case MessageResponseItem mri when mri.Content is { Count: > 0 } mriContent && mriContent.Any(c => c.OutputTextAnnotations is { Count: > 0 }): 803if (mcpTool.Headers is { Count: > 0 }) 840if (specificMode.AlwaysRequireApprovalToolNames is { Count: > 0 } alwaysRequireToolNames) 846if (specificMode.NeverRequireApprovalToolNames is { Count: > 0 } neverRequireToolNames) 1014if (options.Tools is { Count: > 0 } tools) 1068if (result.Tools.Count > 0) 1073if (result.ToolChoice is null && result.Tools.Count > 0) 1119if (tools is not { Count: > 0 }) 1797if (searchAction.Queries is { Count: > 0 } queries) 1819if (wscri.Action is not WebSearchSearchAction { Sources.Count: > 0 } searchAction) 1874if (cicri.Outputs is { Count: > 0 } outputs)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.OpenAI.Tests (33)
OpenAIChatClientTests.cs (1)
255Assert.Equal(i == 10 ? 0 : 1, updates[i].Contents.Count);
OpenAIConversionTests.cs (6)
523Assert.Equal(2, tool.Headers.Count); 556Assert.Equal(3, tool.AllowedTools.ToolNames.Count); 615Assert.Equal(2, tool.ToolCallApprovalPolicy.CustomPolicy.ToolsAlwaysRequiringApproval.ToolNames.Count); 907Assert.Equal(3, message.Contents.Count); 938Assert.Equal(3, message.Contents.Count); 2098Assert.Equal(4, openAIResponse.OutputItems.Count);
OpenAIResponseClientIntegrationTests.cs (2)
292if (approvalResponse.Contents.Count == 0) 297approvalsCount += approvalResponse.Contents.Count;
OpenAIResponseClientTests.cs (19)
768Assert.Equal((i >= 4 && i <= 12) || i == 16 ? 1 : 0, updates[i].Contents.Count); 908Assert.Equal(2, responseMessage.Contents.Count); 1008Assert.Equal(i >= 3 ? 1 : 0, updates[i].Contents.Count); 1374Assert.Equal(2, response.Messages.Count); 1631Assert.Equal(3, message.Contents.Count); 1638Assert.Equal(2, call.Arguments.Count); 2008Assert.Equal(6, message.Contents.Count); 2419Assert.Equal(6, message.Contents.Count); 2628Assert.Equal(4, message.Contents.Count); 3148Assert.Equal((i >= 5 && i <= 13) || i == 17 ? 1 : 0, updates[i].Contents.Count); 3394Assert.Equal(3, message.Contents.Count); 3614Assert.Equal(3, message.Contents.Count); 3715if (content.Inputs is { Count: > 0 }) 3738Assert.Equal(2, message.Contents.Count); 5987var annotatedUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c.Annotations?.Count > 0)); 6378Assert.Equal(2, contents.Count); 7137Assert.Equal(3, message.Contents.Count); 7147Assert.Equal(2, wsResult.Outputs.Count); 7162Assert.Equal(2, textContent.Annotations.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (5)
30Assert.Equal(expectedMessage.Contents.Count, chatMessage.Contents.Count); 31for (int j = 0; j < expectedMessage.Contents.Count; j++) 119if (expected.Count != actual.Count)
Microsoft.Extensions.AI.Stabilization.Tests (16)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.IListAIAnnotation.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.IListAIContent.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.IListAnnotatedRegion.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.IListString.g.cs (1)
55for (int i = 0; i < value.Count; i++)
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\CodeInterpreterToolCallContentTests.cs (2)
59Assert.Equal(3, c.Inputs.Count); 83Assert.Equal(2, deserializedSut.Inputs.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\CodeInterpreterToolResultContentTests.cs (2)
60Assert.Equal(4, c.Outputs.Count); 85Assert.Equal(2, deserializedSut.Outputs.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\ImageGenerationToolResultContentTests.cs (3)
60Assert.Equal(3, c.Outputs.Count); 84Assert.Equal(2, deserializedSut.Outputs.Count); 115Assert.Equal(2, imageResult.Outputs.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\WebSearchToolCallContentTests.cs (1)
30Assert.Equal(2, c.Queries.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\WebSearchToolResultContentTests.cs (2)
63Assert.Equal(3, c.Outputs.Count); 93Assert.Equal(2, deserialized.Outputs.Count);
parent\Microsoft.Extensions.AI.Abstractions.Tests\Tools\HostedCodeInterpreterToolTests.cs (1)
53Assert.Equal(2, tool.Inputs.Count);
Microsoft.Extensions.AI.Tests (35)
ChatCompletion\DistributedCachingChatClientTest.cs (6)
808Assert.Equal(expectedMessage.Contents.Count, actualMessage.Contents.Count); 810for (var itemIndex = 0; itemIndex < expectedMessage.Contents.Count; itemIndex++) 842Assert.Equal(expectedItem.Contents.Count, actualItem.Contents.Count); 844for (var itemIndex = 0; itemIndex < expectedItem.Contents.Count; itemIndex++)
ChatCompletion\FunctionInvokingChatClientTests.cs (4)
785Assert.Equal(2, capturedOptions[0]!.Tools!.Count); 1256Assert.Equal(5, response.Messages.Count); 1329Assert.Equal(messages.Count, context.Messages.Count); 2323var cloned = new List<AIContent>(contents.Count);
ChatCompletion\ImageGeneratingChatClientTests.cs (9)
95Assert.Equal(3, capturedOptions.Tools.Count); 143Assert.Equal(4, capturedOptions.Tools.Count); // DummyFunction + GenerateImage + EditImage + GetImagesForEdit 250Assert.Equal(3, capturedOptions.Tools.Count); 435Assert.Equal(2, contents.Count); 442Assert.Equal(2, contents.Count); 449Assert.Equal(3, contents.Count); 512Assert.Equal(2, contents.Count); 519Assert.Equal(2, contents.Count); 526Assert.Equal(3, contents.Count);
Generated\361d1da7f942c932\CustomAIContentJsonContext.IListAIAnnotation.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\CustomAIContentJsonContext.IListAnnotatedRegion.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAIAnnotation.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAIContent.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListAnnotatedRegion.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\361d1da7f942c932\TestJsonSerializerContext.IListChatMessage.g.cs (1)
55for (int i = 0; i < value.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\CustomAIContentJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext2.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.IListString.g.cs (1)
55for (int i = 0; i < value.Count; i++)
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (5)
30Assert.Equal(expectedMessage.Contents.Count, chatMessage.Contents.Count); 31for (int j = 0; j < expectedMessage.Contents.Count; j++) 119if (expected.Count != actual.Count)
Microsoft.Extensions.AmbientMetadata.Application (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AmbientMetadata.Build (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AsyncState (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Caching.Abstractions (4)
Hybrid\HybridCache.cs (4)
377null or ICollection<string> { Count: 0 } => default, 378ICollection<string> { Count: 1 } => RemoveAsync(keys.First(), cancellationToken), 401null or ICollection<string> { Count: 0 } => default, 402ICollection<string> { Count: 1 } => RemoveByTagAsync(tags.Single(), cancellationToken),
Microsoft.Extensions.Caching.Hybrid (3)
Internal\TagSet.cs (2)
106switch (collection.Count) 118arr = new string[collection.Count];
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Redaction (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Configuration (4)
ConfigurationRoot.cs (3)
32_changeTokenRegistrations = new List<IDisposable>(providers.Count); 116for (int i = providers.Count - 1; i >= 0; i--) 131if (providers.Count == 0)
InternalConfigurationRootExtensions.cs (1)
51for (int i = providers.Count - 1; i >= 0; i--)
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
1194if (attributeData.ConstructorArguments.Count != 1)
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
140var switchMappingsCopy = new Dictionary<string, string>(switchMappings.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.DataIngestion (3)
Chunkers\SectionChunker.cs (2)
49List<IngestionDocumentElement> elements = new(section.Elements.Count); 52for (int i = 0; i < section.Elements.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.DataIngestion.Abstractions (3)
IngestionDocument.cs (2)
46for (int sectionIndex = Sections.Count - 1; sectionIndex >= 0; sectionIndex--) 61for (int i = nestedSection.Elements.Count - 1; i >= 0; i--)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.DataIngestion.Markdig (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.DataIngestion.MarkItDown (2)
MarkItDownMcpReader.cs (1)
94if (result.Content != null && result.Content.Count > 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.DataIngestion.Tests (2)
Processors\AlternativeTextEnricherTests.cs (2)
50Assert.Equal(2, materializedMessages[1].Contents.Count); 137Assert.Equal(batchSize, materializedMessages[1].Contents.Count);
Microsoft.Extensions.DependencyInjection (6)
ServiceLookup\CallSiteFactory.cs (2)
27_descriptors = new ServiceDescriptor[descriptors.Count]; 134attributeData.ConstructorArguments.Count == 1 &&
ServiceLookup\ServiceProviderEngineScope.cs (2)
403var result = new List<object>(source.Count); 404for (int i = 0; i < source.Count; i++)
ServiceProvider.cs (2)
338var result = new List<object>(source.Count); 339for (int i = 0; i < source.Count; i++)
Microsoft.Extensions.DependencyInjection.Abstractions (5)
Extensions\ServiceCollectionDescriptorExtensions.cs (4)
66int count = collection.Count; 490int count = services.Count; 551int count = collection.Count; 585for (int i = collection.Count - 1; i >= 0; i--)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (1)
420for (int i = collection.Count - 1; i >= 0; i--)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics (4)
src\runtime\src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
34int count = sortedTags.Count; 40if (tagsCol.Count != count) 85if (listCount > sortedTags.Count) 115return listCount == sortedTags.Count;
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
51var tasks = new Task<HealthReportEntry>[registrations.Count];
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherTests.cs (1)
118for (int i = 0; i < healthStatuses.Count; i++)
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.Probes (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.Testing (3)
Logging\FakeLogCollector.cs (2)
119if (_options.FilteredLevels.Count > 0 && !_options.FilteredLevels.Contains(record.Level)) 125if (_options.FilteredCategories.Count > 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
166if (ctorArgs.Count != 1 ||
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Entry.cs (2)
95if (left.Count != right.Count)
Microsoft.Extensions.FileSystemGlobbing (15)
Internal\PatternContexts\PatternContextLinear.cs (3)
75Frame.StemItems.RemoveAt(Frame.StemItems.Count - 1); 98return Frame.SegmentIndex == Pattern.Segments.Count - 1; 103if (Frame.SegmentIndex >= Pattern.Segments.Count)
Internal\PatternContexts\PatternContextLinearInclude.cs (1)
28if (Frame.SegmentIndex < Pattern.Segments.Count)
Internal\PatternContexts\PatternContextRagged.cs (8)
69frame.SegmentIndex = Frame.SegmentGroup.Count; 85frame.SegmentIndex == frame.SegmentGroup.Count && 86frame.SegmentGroupIndex != Pattern.Contains.Count) 90if (frame.SegmentGroupIndex < Pattern.Contains.Count) 112Frame.StemItems.RemoveAt(Frame.StemItems.Count - 1); 150return Frame.SegmentGroupIndex == Pattern.Contains.Count; 155if (Frame.SegmentIndex >= Frame.SegmentGroup.Count) 164int groupLength = Frame.SegmentGroup.Count;
Internal\PatternContexts\PatternContextRaggedExclude.cs (2)
34if (Pattern.EndsWith.Count == 0 && 35Frame.SegmentGroupIndex == Pattern.Contains.Count - 1 &&
Internal\PatternContexts\PatternContextRaggedInclude.cs (1)
29if (IsStartingGroup() && Frame.SegmentIndex < Frame.SegmentGroup.Count)
Microsoft.Extensions.Hosting.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Http (3)
DefaultHttpClientFactory.cs (2)
111for (int i = 0; i < options.HttpClientActions.Count; i++) 172for (int i = 0; i < options.HttpMessageHandlerBuilderActions.Count; i++)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (1)
64public int Count => _services.Count;
Microsoft.Extensions.Http.Diagnostics (10)
Logging\Internal\HttpClientLogger.cs (2)
62_logResponseHeaders = options.ResponseHeadersDataClasses.Count > 0; 63_logRequestHeaders = options.RequestHeadersDataClasses.Count > 0;
Logging\Internal\HttpRequestReader.cs (5)
86_logRequestBody = options.RequestBodyContentTypes.Count > 0; 87_logResponseBody = options.ResponseBodyContentTypes.Count > 0; 90_logRequestHeaders = options.RequestHeadersDataClasses.Count > 0; 91_logResponseHeaders = options.ResponseHeadersDataClasses.Count > 0; 92_logRequestQueryParameters = options.RequestQueryParametersDataClasses.Count > 0;
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Extensions.Http.Resilience (5)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (1)
90for (int i = handlers.Count - 1; i >= 0; i--)
Routing\Internal\OrderedGroups\OrderedGroupsRoutingStrategy.cs (1)
60if (_lastUsedIndex >= _groups!.Count)
Routing\Internal\RoutingHelper.cs (2)
17for (int i = 0; i < endpoints.Count; i++) 23for (int i = 0; i < endpoints.Count; i++)
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
94var count = builder.Services.Count;
Microsoft.Extensions.Logging (4)
LoggerFilterOptions.cs (2)
58if (Rules.Count > 0) 60debugText += $", Rules = {Rules.Count}";
src\runtime\src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (2)
19for (int i = 0; i < attributes.Count; i++) 23attributeData.ConstructorArguments.Count > 0)
Microsoft.Extensions.Logging.AzureAppServices (2)
AzureAppServicesLoggerFactoryExtensions.cs (2)
92var beforeCount = collection.Count; 94return beforeCount != collection.Count;
Microsoft.Extensions.Logging.Configuration (2)
src\runtime\src\libraries\Common\src\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs (2)
19for (int i = 0; i < attributes.Count; i++) 23attributeData.ConstructorArguments.Count > 0)
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Options.Contextual (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Options.SourceGeneration (3)
Emitter.cs (3)
128for (var i = 0; i < vt.ModelsToValidate.Count; i++) 179for (var j = 0; j < attributeInstance.InstantiationLines.Count; j++) 183if (j != attributeInstance.InstantiationLines.Count - 1)
Microsoft.Extensions.Resilience (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Resilience.Tests (3)
Resilience\ResilienceServiceCollectionExtensionsTests.cs (3)
34var count = _services.Count; 56var count = _services.Count; 60_services.Count.Should().Be(count);
Microsoft.Extensions.ServiceDiscovery (5)
Configuration\ConfigurationServiceEndpointProvider.cs (1)
56if (endpoints.Endpoints.Count != 0)
Configuration\ConfigurationServiceEndpointProvider.Log.cs (2)
33for (var i = endpoints.Count - added; i < endpoints.Count; i++)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
PassThrough\PassThroughServiceEndpointProvider.cs (1)
16if (endpoints.Endpoints.Count == 0)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.ServiceDiscovery.Dns (5)
DnsServiceEndpointProviderBase.cs (1)
64if (endpoints.Endpoints.Count != 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Resolver\DnsResolver.cs (3)
35if (_options.Servers.Count == 0) 44if (_options.Servers.Count == 0) 378for (int index = 0; index < _options.Servers.Count; index++)
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Telemetry (3)
Logging\Import\ProviderAliasUtilities.cs (2)
21for (int i = 0; i < attributes.Count; i++) 25attributeData.ConstructorArguments.Count > 0)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Telemetry.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.TimeProvider.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.VectorData.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Gen.BuildMetadata.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
53if (receiver == null || receiver.TypeDeclarations.Count == 0)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.Logging.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.MetadataExtractor (4)
ComplianceReportsGenerator.cs (1)
53if (receiver == null || receiver.TypeDeclarations.Count == 0)
MetadataReportsGenerator.cs (2)
62((TypeDeclarationSyntaxReceiver)context.SyntaxReceiver).TypeDeclarations.Count == 0 || 68if ((context.SyntaxReceiver is not TypeDeclarationSyntaxReceiver || ((TypeDeclarationSyntaxReceiver)context.SyntaxReceiver).TypeDeclarations.Count == 0))
MetricsReportsGenerator.cs (1)
41receiver.ClassDeclarations.Count == 0 ||
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.Metrics.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Gen.MetricsReports (1)
MetricsReportsGenerator.cs (1)
41receiver.ClassDeclarations.Count == 0 ||
Microsoft.Gen.MetricsReports.Unit.Tests (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Microsoft.Interop.SourceGeneration (5)
Marshalling\MarshallerHelpers.cs (5)
124Dictionary<U, int> elementIndexToEdgeMapNodeId = new(elements.Count); 125List<T> nodeIdToElement = new(elements.Count); 126EdgeMap edgeMap = new(elements.Count); 151List<T> L = new(elements.Count); 153List<T> S = new(elements.Count);
Microsoft.Maui (10)
Extensions\EnumerableExtensions.cs (1)
182 public static T Last<T>(this IList<T> self) => self[self.Count - 1];
Handlers\Layout\LayoutExtensions.cs (1)
12 var count = layout.Count;
Layouts\AbsoluteLayoutManager.cs (2)
27 for (int n = 0; n < AbsoluteLayout.Count; n++) 68 for (int n = 0; n < AbsoluteLayout.Count; n++)
Layouts\GridLayoutManager.cs (1)
121 var gridChildCount = _grid.Count;
Layouts\HorizontalStackLayoutManager.cs (3)
20 for (int n = 0; n < Stack.Count; n++) 49 var childCount = Stack.Count; 58 for (int n = 0; n < Stack.Count; n++)
Layouts\VerticalStackLayoutManager.cs (2)
21 for (int n = 0; n < Stack.Count; n++) 54 for (int n = 0; n < Stack.Count; n++)
Microsoft.Maui.Controls (73)
Element\Element.cs (1)
267 for (int i = LogicalChildrenInternalBackingStore.Count - 1; i >= 0; i--)
FormattedString.cs (1)
25 for (int i = 0; i < Spans.Count; i++)
IndicatorView\IndicatorStackLayout.cs (1)
104 var childrenCount = Children.Count;
Interactivity\TriggerBase.cs (1)
168 get { return _actual.Count; }
Internals\NotifyCollectionChangedEventArgsExtensions.cs (1)
19 for (var i = 0; i < from.Count; i++)
Items\SelectableItemsView.cs (5)
94 if (newSelection?.Count > 0) 96 for (int n = 0; n < newSelection.Count; n++) 219 if (previousSelection.Count == newSelection.Count) 221 if (previousSelection.Count == 0 || (previousSelection[0] == newSelection[0]))
Items\SelectionList.cs (2)
32 public int Count => _internal.Count; 119 for (int n = 0; n < _internal.Count; n++)
Label\Label.cs (4)
389 => (FormattedText?.Spans?.Count ?? 0) > 0; 394 if (FormattedText?.Spans == null || FormattedText?.Spans.Count == 0) 398 for (int i = 0; i < FormattedText.Spans.Count; i++) 401 if (span.GestureRecognizers.Count > 0 && (((ISpatialElement)span).Region.Contains(point) || point.IsEmpty))
Layout\FlexLayout.cs (1)
608 for (var i = 0; i < Children.Count; i++)
LegacyLayouts\StackLayout.cs (2)
128 layout.Plots = new Rect[Children.Count]; 129 layout.Requests = new SizeRequest[Children.Count];
Menu\MenuBar.cs (2)
46 for (int i = 0; i < menuBarItems.Count; i++) 58 while (this.Count > menuBarItems.Count)
Menu\MenuBarTracker.cs (1)
50 if (menuBarItems.Count == 0)
MultiBinding.cs (3)
58 var bindingsclone = new List<BindingBase>(Bindings.Count); 154 _bpProxies = new BindableProperty[Bindings.Count]; 157 for (var i = 0; i < Bindings.Count; i++)
MultiPage.cs (2)
229 for (int i = e.NewStartingIndex; i < Children.Count; i++) 248 for (int i = removeIndex + e.OldItems.Count; i < Children.Count; i++)
ObservableList.cs (1)
21 int index = Items.Count;
OrderedDictionary.cs (1)
74 public OrderedDictionary(ICollection<KeyValuePair<TKey, TValue>> dictionary, IEqualityComparer<TKey> equalityComparer) : this(dictionary != null ? dictionary.Count : 0, equalityComparer)
Picker\Picker.cs (9)
241 return picker.Items == null ? -1 : ((int)value).Clamp(-1, picker.Items.Count - 1); 310 int insertIndex = e.NewStartingIndex < 0 ? Items.Count : e.NewStartingIndex; 324 if (e.OldStartingIndex < Items.Count) 333 removeStart = Items.Count - e.OldItems.Count; 334 index = Items.Count - 1; 373 var newIndex = SelectedIndex.Clamp(-1, Items.Count - 1); 443 int IItemDelegate<string>.GetCount() => Items?.Count ?? ItemsSource?.Count ?? 0; 449 if (index < Items?.Count) 458 if (index < Items?.Count)
ReadOnlyCastingList.cs (2)
30 get { return _list.Count; } 86 public int Count => _list.Count;
Shell\Shell.cs (1)
1776 if (Items.Count <= 1)
Shell\ShellUriHandler.cs (3)
830 for (int i = itemIndex; i < Shell.Items.Count; i++) 832 for (int j = sectionIndex; j < Shell.Items[i].Items.Count; j++) 834 for (int k = contentIndex; k < Shell.Items[i].Items[j].Items.Count;)
ShellToolbar.cs (1)
117 _toolbarTracker.ToolbarItems.Count > 0 ||
TemplateUtilities.cs (4)
62 while (self.InternalChildren.Count > 0) 64 self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1); 108 while (self.InternalChildren.Count > 0) 110 self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1);
VisualElement\VisualElement_StyleSheet.cs (1)
21 for (int i = 0; i < attrList.Count; i++)
VisualElement\VisualElement.cs (2)
1491 if (groups.Count == 0) 1575 if (groups.Count == 0)
VisualStateManager.cs (21)
160 var groupCount = groups.Count; 191 var stateCount = group.States.Count; 223 if (groups.Count > 0) 290 public int Count => _internalList.Count; 435 if (state.StateTriggers.Count > 0) 451 for (var stateIndex = 0; stateIndex < States.Count; stateIndex++) 454 for (var triggerIndex = 0; triggerIndex < state.StateTriggers.Count; triggerIndex++) 579 if (States.Count != other.States.Count) 581 for (var i = 0; i < States.Count; i++) 592 for (var i = 0; i < States.Count; i++) 663 if (Setters.Count != other.Setters.Count) 665 if (StateTriggers.Count != other.StateTriggers.Count) 667 for (var i = 0; i < Setters.Count; i++) 670 for (var i = 0; i < StateTriggers.Count; i++) 681 for (var i = 0; i < Setters.Count; i++) 683 for (var i = 0; i < StateTriggers.Count; i++) 711 for (var i = 0; i < list.Count; i++) 714 for (var j = 0; j < group.States.Count; j++)
Microsoft.Maui.Controls.Build.Tasks (8)
SetPropertiesVisitor.cs (8)
596 if (properties != null && properties.Count > 0) 598 var lastProp = properties[properties.Count - 1]; 858 if (properties == null || properties.Count == 0) 917 if (properties == null || properties.Count == 0) 965 il.Append(DigProperties(properties.Take(properties.Count - 1), locs, () => 1058 if (properties == null || properties.Count == 0) 1064 for (int i = 0; i < properties.Count; i++) 1137 for (int i = 0; i < properties.Count; i++)
Microsoft.Maui.Controls.Maps (6)
HandlerImpl\Polygon.Impl.cs (3)
34 public int Count => Geopath.Count; 48 var index = Geopath.Count; 58 for (int i = Geopath.Count - 1; i >= 0; i--)
HandlerImpl\Polyline.Impl.cs (3)
32 public int Count => Geopath.Count; 46 var index = Geopath.Count; 56 for (int i = Geopath.Count - 1; i >= 0; i--)
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (1)
550 if (types.Count == 0)
src\Controls\src\Xaml\XmlTypeXamlExtensions.cs (1)
76 name += "`" + typeArguments.Count; //this will return an open generic Type
Microsoft.Maui.Controls.Xaml (2)
ApplyPropertiesVisitor.cs (1)
292 if (contentAttribute == null || contentAttribute.ConstructorArguments.Count != 1)
XmlTypeXamlExtensions.cs (1)
76 name += "`" + typeArguments.Count; //this will return an open generic Type
Microsoft.ML.AutoML (7)
Experiment\Experiment.cs (3)
171= _runner.Run(pipeline, _modelDirectory, _history.Count + 1); 217} while (_history.Count < _experimentSettings.MaxModels && 253_logger.Trace($"{_history.Count}\t{runResult.Score}\t{stopwatch.Elapsed}\t{pipeline.ToString()}");
TrainerExtensions\TrainerExtensionCatalog.cs (4)
72columnInfo.ImagePathColumnNames.Count == 1 && 73columnInfo.CategoricalColumnNames.Count == 0 && 74columnInfo.NumericColumnNames.Count == 0 && 75columnInfo.TextColumnNames.Count == 0)
Microsoft.ML.CodeGenerator (10)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (2)
112if (NamedParameters != null && NamedParameters.Count > 0) 137if (arguments.Count == 0)
Templates\Azure\Console\AzureModelBuilder.cs (2)
80if(PreTrainerTransforms.Count >0 ) { 85for(int i=0;i<PreTrainerTransforms.Count;i++)
Templates\Console\ModelBuilder.cs (5)
102if(PreTrainerTransforms.Count >0 ) { 105for(int i=0;i<PreTrainerTransforms.Count;i++) 128for(int i=0;i<PostTrainerTransforms.Count;i++) 137if(PreTrainerTransforms.Count >0 && Trainer != String.Empty ) { 140else if (PreTrainerTransforms.Count >0 && Trainer == String.Empty) {
Utils.cs (1)
308for (int i = 1; i < result.Count; i += 3)
Microsoft.ML.Core (20)
Utilities\BinFinder.cs (7)
32var numValues = values.Count + ((numZeroes > 0) ? 1 : 0); 51Contracts.Assert(numValues == values.Count + 1); 52_valuesSng[values.Count] = 0; 110var numValues = values.Count + ((numZeroes > 0) ? 1 : 0); 129Contracts.Assert(numValues == values.Count + 1); 130_valuesDbl[values.Count] = 0; 187Contracts.Check(counts.Count >= numValues);
Utilities\Contracts.cs (1)
81return c == null ? 0 : c.Count;
Utilities\SupervisedBinFinder.cs (4)
65_valueCount = values.Count; 69Contracts.Assert(_valueCount == labels.Count); 143_valueCount = values.Count; 147Contracts.Assert(_valueCount == labels.Count);
Utilities\Utils.cs (8)
81return x == null ? 0 : x.Count; 209return FindIndexSorted(input, 0, input.Count, value); 221return FindIndexSorted(input, 0, input.Count, value); 288Contracts.Assert(0 <= min && min <= lim && lim <= input.Count); 322Contracts.Assert(0 <= min && min <= lim && lim <= input.Count); 605var listLength = values.Count; 631var listLength = values.Count; 657var listLength = values.Count;
Microsoft.ML.Core.Tests (2)
UnitTests\TestEntryPoints.cs (2)
2245for (int i = 0; i < kvps.Count; i++) 2252for (int j = 0; j < list.Count; j++)
Microsoft.ML.CpuMath (1)
src\Microsoft.ML.Core\Utilities\Contracts.cs (1)
81return c == null ? 0 : c.Count;
Microsoft.ML.Data (8)
DataView\DataViewConstructionUtils.cs (6)
617return _data.Count; 643_permutation = Utils.GetRandomPermutation(rand, dataView._data.Count); 670Ch.Check(0 <= Position && Position < _data.Count, RowCursorUtils.FetchValueStateError); 676Ch.Assert(Position < _data.Count); 677return Position + 1 < _data.Count; 701=> (_data as ICollection<TRow>)?.Count;
Prediction\Calibrator.cs (2)
1832PlattCalibrator newCal = new PlattCalibrator(_host, a / calibrators.Count, b / calibrators.Count);
Microsoft.ML.Ensemble (9)
Selector\DiversityMeasure\BaseDisagreementDiversityMeasure.cs (4)
17Contracts.Assert(models.Count > 1); 18Contracts.Assert(predictions.Count == models.Count); 22for (int i = 0; i < (models.Count - 1); i++) 24for (int j = i + 1; j < models.Count; j++)
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
38int modelCountToBeSelected = (int)(models.Count * LearnersSelectionProportion);
Selector\SubModelSelector\BaseDiverseSelector.cs (2)
71if (models.Count <= 1) 81var modelCountToBeSelected = (int)(models.Count * LearnersSelectionProportion);
Selector\SubModelSelector\BestDiverseSelectorMulticlass.cs (2)
45Host.Assert(models.Count > 1); 46Host.Assert(predictions.Count == models.Count);
Microsoft.ML.FastTree (3)
TreeEnsemble\InternalTreeEnsemble.cs (3)
401if (trees.Count == 0) 405for (int iteration = 0; iteration < trees.Count; iteration++) 415this[k] = this[k] / trees.Count;
Microsoft.ML.IntegrationTests (2)
Common.cs (2)
333for (int i = 0; i < array.Count; i++) 348for (int i = 0; i < array.Count; i++)
Microsoft.ML.ResultProcessor (5)
ResultProcessor.cs (5)
894while (i < lines.Count) 896if (lines[i] == FoldSeparatorString && (i + 1) < lines.Count && lines[i + 1].StartsWith("FOLD")) 900while (endLineIdx < lines.Count && lines[endLineIdx] != FoldSeparatorString) 902if (endLineIdx == lines.Count) 986for (int i = 1; i < lines.Count; i++)
Microsoft.ML.SearchSpace (2)
Option\NestOption.cs (1)
86public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count;
SearchSpace.cs (1)
89public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count;
Microsoft.ML.StandardTrainers (3)
Standard\LinearModelParameters.cs (3)
338for (int i = 1; i < models.Count; i++) 348VectorUtils.ScaleBy(ref weights, (float)1 / models.Count); 349bias /= models.Count;
Microsoft.ML.Tests (2)
OnnxSequenceTypeWithAttributesTest.cs (2)
65Assert.True(onnxOut.Count == 3, "Output missing data."); 67for (var i = 0; i < onnxOut.Count; ++i)
Microsoft.ML.Tokenizers (12)
Model\BertTokenizer.cs (9)
301int capacity = c1.Count + 2; // Add 2 for [CLS] and two [SEP] tokens. 305capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1; 412int capacity = c1.Count + 2; 416capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1; 568int capacity = c1.Count + 2; // Add 2 for [CLS] and [SEP] tokens. 572capacity += additionalTokenIds is ICollection<int> c2 ? c2.Count + 1 : c1.Count + 1;
ModelSourceGenerationContext.g.cs (1)
51for (int i = 0; i < options.Converters.Count; i++)
Tokenizer.cs (1)
374idCount = c.Count;
Utils\IListExtensions.cs (1)
19int count = listToAdd.Count;
Microsoft.ML.TorchSharp (2)
Utils\DataUtils.cs (2)
24var res = values[0].new_full(values.Count, size, padIndex, device: device); 26for (var i = 0; i < values.Count; ++i)
Microsoft.NET.Build.Extensions.Tasks (3)
src\sdk\src\Tasks\Common\ConflictResolution\ResolvePackageFileConflicts.cs (3)
219var conflictItems = new ITaskItem[conflicts.Count]; 289if (original is null || conflicts.Count == 0) 294var result = new ITaskItem[original.Length - conflicts.Count];
Microsoft.NET.Build.Tasks (14)
_generated\13\WorkloadSetJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\21\InstallStateJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\7\SdkVulnerabilitySummaryContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
ResolvePackageAssets.cs (7)
1288if (_compileTimeTarget.Libraries.Count >= _runtimeTarget.Libraries.Count) 1529if (_lockFile.LogMessages.Count == 0) 1536for (int i = 0; i < _lockFile.LogMessages.Count; i++) 1551var packageReverseDependencies = new Dictionary<string, HashSet<string>>(_compileTimeTarget.Libraries.Count, StringComparer.OrdinalIgnoreCase); 1552for (int i = 0; i < _compileTimeTarget.Libraries.Count; i++) 1562for (int j = 0; j < parentPackage.Dependencies.Count; j++)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (1)
29if (UnsortedSuggestions.Count == 0)
src\sdk\src\Tasks\Common\ConflictResolution\ResolvePackageFileConflicts.cs (3)
219var conflictItems = new ITaskItem[conflicts.Count]; 289if (original is null || conflicts.Count == 0) 294var result = new ITaskItem[original.Length - conflicts.Count];
Microsoft.Net.Http.Headers (22)
CacheControlHeaderValue.cs (7)
343if ((_noCacheHeaders != null) && (_noCacheHeaders.Count > 0)) 385if ((_privateHeaders != null) && (_privateHeaders.Count > 0)) 456if ((_noCacheHeaders != null) && (_noCacheHeaders.Count > 0)) 464if ((_privateHeaders != null) && (_privateHeaders.Count > 0)) 472if ((_extensions != null) && (_extensions.Count > 0)) 733var originalValueCount = destination == null ? 0 : destination.Count; 764if ((destination != null) && (destination.Count > originalValueCount))
HeaderUtilities.cs (6)
93return (y == null) || (y.Count == 0); 98return (x.Count == 0); 101if (x.Count != y.Count) 106if (x.Count == 0) 113var alreadyFound = new bool[x.Count];
HttpHeaderParser.cs (1)
77for (var i = 0; i < values.Count; i++)
NameValueHeaderValue.cs (7)
286if ((values == null) || (values.Count == 0)) 291for (var i = 0; i < values.Count; i++) 309if ((values == null) || (values.Count == 0)) 323if ((values == null) || (values.Count == 0)) 329for (var i = 0; i < values.Count; i++) 438if ((values == null) || (values.Count == 0)) 443for (var i = 0; i < values.Count; i++)
RangeItemHeaderValue.cs (1)
109Contract.Ensures((Contract.Result<int>() == 0) || (rangeCollection.Count > 0),
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (8)
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAssetPathPattern.cs (6)
376for (var i = 0; i < Segments.Count; i++) 498for (var i = 0; i < segments.Count; i++) 506for (var j = 0; j < segment.Parts.Count; j++) 555for (var i = 0; i < Segments.Count; i++) 569private static bool IsLiteralSegment(StaticWebAssetPathSegment segment) => segment.Parts.Count == 1 && segment.Parts[0].IsLiteral; 579var isLiteral = segment.Parts.Count == 1 && segment.Parts[0].IsLiteral;
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAssetPathSegment.cs (2)
40for (var i = 0; i < Parts.Count; i++) 53return Parts != null && Parts.Count == 1 && Parts[0].IsLiteral ? Parts[0].Name.ToString() : ComputeParameterExpression();
Microsoft.NET.Sdk.Publish.Tasks (7)
MsDeploy\CommonUtility.cs (4)
1126Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1177Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1178Dictionary<string, string?> entryIdentityDictionary = new(parameters.Count); 1422int maxCount = sortedList.Count;
Tasks\MsDeploy\MSDeploy.cs (3)
678Dictionary<string, string> lookupDictionary = new(items.Count); 754Dictionary<string, string> lookupDictionary = new(items.Count); 755Dictionary<string, string> nameValueDictionary = new(items.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Sdk.Razor.Tasks (2)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerRequest.cs (2)
85var requestLength = args.Count + 1; 97for (var i = 0; i < args.Count; ++i)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (18)
_generated\29\StaticWebAssetsJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\42\DefineStaticWebAssetsSerializerContext.g.cs (1)
73for (int i = 0; i < options.Converters.Count; i++)
_generated\49\ImportMapSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
ApplyCompressionNegotiation.cs (1)
197var result = new Dictionary<string, List<StaticWebAssetEndpoint>>(endpointsByAsset.Count);
Data\StaticWebAssetEndpoint.cs (2)
231if (endpoints == null || endpoints.Count == 0) 236var endpointItems = new ITaskItem[endpoints.Count];
Data\StaticWebAssetPathPattern.cs (6)
376for (var i = 0; i < Segments.Count; i++) 498for (var i = 0; i < segments.Count; i++) 506for (var j = 0; j < segment.Parts.Count; j++) 555for (var i = 0; i < Segments.Count; i++) 569private static bool IsLiteralSegment(StaticWebAssetPathSegment segment) => segment.Parts.Count == 1 && segment.Parts[0].IsLiteral; 579var isLiteral = segment.Parts.Count == 1 && segment.Parts[0].IsLiteral;
Data\StaticWebAssetPathSegment.cs (2)
40for (var i = 0; i < Parts.Count; i++) 53return Parts != null && Parts.Count == 1 && Parts[0].IsLiteral ? Parts[0].Name.ToString() : ComputeParameterExpression();
JSModules\ApplyJsModules.cs (2)
67if (jsModuleFiles.Count > 1) 80if (jsModuleFiles.Count > 1)
ScopedCss\ApplyCssScopes.cs (2)
70if (scopeFiles.Count > 1) 83if (scopeFiles.Count > 1)
Microsoft.NET.Sdk.WorkloadManifestReader (3)
_generated\11\InstallStateJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
_generated\3\WorkloadSetJsonSerializerContext.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
WorkloadSuggestionFinder.cs (1)
29if (UnsortedSuggestions.Count == 0)
Microsoft.TemplateEngine.Core (3)
Util\EncodingConfig.cs (1)
37_values = new Func<object>[config.Variables.Count];
VariableCollection.cs (2)
49public int Count => Keys.Count; 136if (_values.Count > 0)
Microsoft.TemplateEngine.Edge (3)
_generated\17\SettingsStoreJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\43\TemplateCacheJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\7\GlobalSettingsJsonSerializerContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
_generated\1\JsonEncodeSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Microsoft.TestPlatform.CommunicationUtilities (3)
_generated\103\TestPlatformJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
_generated\80\TestPlatformJsonContext.IListUriDataAttachment.g.cs (1)
57for (int i = 0; i < value.Count; i++)
_generated\81\TestPlatformJsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
Microsoft.TestPlatform.CrossPlatEngine (9)
AttachmentsProcessing\TestRunAttachmentsProcessingManager.cs (2)
143if (attachmentProcessorUris == null || attachmentProcessorUris.Count == 0) 178if (processedAttachments != null && processedAttachments.Count > 0)
Client\Parallel\DiscoveryDataAggregator.cs (1)
132if (metrics == null || metrics.Count == 0 || _metricsAggregator == null)
Client\Parallel\ParallelRunDataAggregator.cs (1)
190if (metrics == null || metrics.Count == 0 || _metricsAggregator == null)
Client\ProxyExecutionManager.cs (1)
349if (attachDebuggerInfo.Sources is null || attachDebuggerInfo.Sources.Count == 0)
DataCollection\DataCollectionTestRunEventsHandler.cs (1)
207if (newAttachments == null || newAttachments.Count == 0)
Execution\BaseRunTests.cs (3)
364_requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterDiscoveredDuringExecution, executorUriExtensionMapList.Count); 631_requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterUsedToRunTests, ExecutorUrisThatRanTests.Count); 633if (lastChunkTestResults.Count != 0 && IsTestSourceIsPackage())
Microsoft.VisualStudio.TestPlatform.Client (2)
Discovery\DiscoveryRequest.cs (1)
292if (metrics != null && metrics.Count != 0)
Execution\TestRunRequest.cs (1)
445if (metrics != null && metrics.Count != 0)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
XML\XmlPersistence.cs (1)
447if (list == null || list.Count <= 0)
Microsoft.VisualStudio.TestPlatform.ObjectModel (6)
Nuget.Frameworks\FrameworkNameProvider.cs (1)
961destination.Add(framework, destination.Count);
Nuget.Frameworks\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 208if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 250EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 348if (dictionary.Count == 0)
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
51if (Arguments != null && Arguments.Count > 0)
Microsoft.Web.XmlTransform (13)
XmlArgumentUtility.cs (2)
60if (arguments.Count != combinedArguments.Count) { 68for (int i = 0; i < arguments.Count; i++) {
XmlAttributeTransform.cs (5)
47if (Arguments == null || Arguments.Count == 0) { 50else if (Arguments.Count == 1) { 69string[] array = new string[arguments.Count]; 75Debug.Assert(arguments.Count == 1, "Should only call warnIfEmpty==true with one argument"); 76if (arguments.Count == 1) {
XmlLocator.cs (3)
125if (Arguments == null || Arguments.Count < min) { 133if (Arguments == null || Arguments.Count != min) { 140if (Arguments.Count > max) {
XmlTransforms.cs (3)
117if (Arguments == null || Arguments.Count == 0) { 120else if (Arguments.Count > 1) { 448if (!(locators == null || locators.Count == 0))
Mono.Cecil (2)
Mono.Cecil.Cil\Symbols.cs (1)
812 for (int i = 0; i < scopes.Count; i++) {
Mono.Collections.Generic\Collection.cs (1)
117 this.items = new T [items.Count];
Mono.Cecil.Rocks (1)
Mono.Cecil.Rocks\DocCommentId.cs (1)
156 for (int i = 0; i < list.Count; i++) {
MSBuild (9)
OutOfProcTaskHostNode.cs (3)
429return (warningsAsErrors.Count == 0 && WarningAsErrorNotOverriden(warningCode)) || warningsAsErrors.Contains(warningCode); 433return (warningsAsErrors.Count == 0 && WarningAsErrorNotOverriden(warningCode)) || warningsAsMessages.Contains(warningCode); 547for (int i = 0; i < targetOutputsPerProject.Length && i < result.TargetOutputsPerProject.Count; i++)
src\msbuild\src\Shared\TaskHostBuildResponse.cs (3)
89if (engineResult.TargetOutputsPerProject is not null && engineResult.TargetOutputsPerProject.Count > 0) 91outputs = new List<Dictionary<string, TaskParameter>>(engineResult.TargetOutputsPerProject.Count); 95var dict = new Dictionary<string, TaskParameter>(projectOutputs?.Count ?? 0, StringComparer.OrdinalIgnoreCase);
src\msbuild\src\Shared\TypeLoader.cs (1)
665if (targetFrameworkAttr != null && targetFrameworkAttr.ConstructorArguments.Count > 0)
XMake.cs (2)
1938nodeResultKvp.Key.ProjectInstance.GlobalProperties.Count == entryPoint.GlobalProperties.Count &&
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
109if (remainingTasks.Count > 0)
NuGet.Build.Tasks (2)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
NuGet.Build.Tasks.Console (6)
MSBuildStaticGraphRestore.cs (1)
731projects.Count, string.Join(",", projects)));
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.Build.Tasks.Pack (2)
PackTaskLogic.cs (2)
999for (var i = 0; i < frameworks.Count; i++) 1057for (int i = 0; i < packageDependencies.Count; i++)
NuGet.CommandLine.XPlat (24)
_generated\35\PackageSearchJsonContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Commands\Package\Download\PackageDownloadRunner.cs (2)
53bool hasSourcesArg = args.Sources?.Count > 0; 349if (sources != null && sources.Count > 0)
Commands\Package\Update\PackageUpdateIO.cs (1)
212if (packageTfmAliases.Count == updatedPackageSpec.TargetFrameworks.Count)
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (3)
259assetsFile.Targets.Count == 0) 477int taskCount = Math.Min(items.Count, maxParallel); 493while (itemIndex < items.Count)
Commands\PackageSearch\PackageSearchRunner.cs (1)
69if (listEndpoints == null || listEndpoints.Count == 0)
Commands\Why\DependencyGraphFinder.cs (4)
39&& (assetsFile.PackageSpec.RestoreMetadata.OriginalTargetFrameworks.Count != 1 40|| assetsFile.PackageSpec.TargetFrameworks.Count != 1 41|| assetsFile.PackageSpec.RestoreMetadata.TargetFrameworks.Count != 1 102List<PackageDependency> dependencies = new List<PackageDependency>(directPackages.Length + directProjectReferences.Count);
Commands\Why\WhyCommandRunner.cs (1)
278|| assetsFile.Targets.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
Utility\AddPackageCommandUtility.cs (1)
107for (int i = 0; i < requestedSources.Count; i++)
Utility\CommandLineUtility.cs (1)
32if (inputs?.Count > 0)
Utility\MSBuildAPIUtility.cs (1)
712project.GetItems(PACKAGE_REFERENCE_TYPE_TAG).Count != 0 ||
Utility\TableParser.cs (1)
151maxColumnsWidth = new int[row.Count];
NuGet.Commands (96)
CommandRunners\LocalsCommandRunner.cs (1)
42if (((localsArgs.Arguments.Count == 0) || string.IsNullOrWhiteSpace(localsArgs.Arguments[0]))
CommandRunners\PackCommandRunner.cs (1)
796if (logMessages.Count > 0)
RestoreCommand\CompatibilityChecker.cs (12)
266if (group.Items.Count > 0) 358targetLibrary.RuntimeAssemblies.Count > 0 || // Runtime Assemblies, or 359targetLibrary.CompileTimeAssemblies.Count > 0 || // Compile-time Assemblies, or 360targetLibrary.FrameworkAssemblies.Count > 0 || // Framework Assemblies, or 361targetLibrary.FrameworkReferences.Count > 0 || // Framework References, or 362targetLibrary.ContentFiles.Count > 0 || // Shared content 363targetLibrary.ResourceAssemblies.Count > 0 || // Resources (satellite package) 364targetLibrary.Build.Count > 0 || // Build 365targetLibrary.BuildMultiTargeting.Count > 0; // Cross targeting build 373for (int i = 0; i < _lockFile.Targets.Count; ++i) 379for (int j = 0; j < target.Libraries.Count; ++j) 394for (var i = 0; i < _lockFile.Libraries.Count; i++)
RestoreCommand\Diagnostics\UnresolvedMessages.cs (7)
111else if (unresolved.TypeConstraintAllows(LibraryDependencyTarget.Package) && applicableRemoteLibraryProviders.Count > 0) 127if (isPackageSourceMappingEnabled && applicableRemoteLibraryProviders.Count != allRemoteLibraryProviders.Count) 161if (isPackageSourceMappingEnabled && allRemoteLibraryProviders.Count != applicableRemoteLibraryProviders.Count) 182if (isPackageSourceMappingEnabled && applicableRemoteLibraryProviders.Count != allRemoteLibraryProviders.Count)
RestoreCommand\LockFileBuilder.cs (2)
360if (lockFile.Libraries.Count != libraryReferences.Count) 393if (lockFileTarget.Libraries.Count == libraryReferences.Count)
RestoreCommand\OriginalCaseGlobalPackageFolder.cs (1)
136for (var i = 0; i < lockFile.Libraries.Count; i++)
RestoreCommand\ProjectRestoreCommand.cs (3)
221List<Task<DownloadDependencyResolutionResult>> downloadDependencyResolutionTasks = new(capacity: packageSpec.TargetFrameworks.Count); 324if (graph.Unresolved.Count > 0) 336var ddSuccess = downloadDependencyResults.All(e => e.Unresolved.Count == 0);
RestoreCommand\RequestFactory\RestoreArgs.cs (1)
152for (var i = 0; i < dgSpecSources.Count; i++)
RestoreCommand\RestoreCommand.cs (14)
401telemetry.TelemetryEvent[TargetFrameworksCount] = _request.Project.TargetFrameworks.Count; 627telemetry.TelemetryEvent[TotalUniquePackagesCount] = cacheFile.ExpectedPackageFilePaths?.Count ?? -1; 891telemetry.TelemetryEvent[TotalUniquePackagesCount] = cacheFile?.ExpectedPackageFilePaths.Count; 1103if (project.TargetFrameworks.Count == 1) 1187if (prunedPackage.Value.Count != project.TargetFrameworks.Count) 2033if (_request.Project.TargetFrameworks.Count == 0) 2210if (_request.Project.TargetFrameworks.Count == 0) 2393if (packageSpec.TargetFrameworks.Count <= 1) 2398var seenFrameworks = new HashSet<NuGetFramework>(packageSpec.TargetFrameworks.Count); 2399for (int i = 0; i < packageSpec.TargetFrameworks.Count; i++) 2414if (request.ExternalProjects.Count == 0) 2420else if (request.ExternalProjects.Count > 0) 2476List<FrameworkRuntimeDefinition> projectFrameworkRuntimePairs = new(capacity: packageSpec.TargetFrameworks.Count * (runtimeIds.Count + 1));
RestoreCommand\RestoreSummary.cs (1)
74InstallCount = result.GetAllInstalled().Count;
RestoreCommand\Utility\BuildAssetsUtils.cs (5)
484|| request.Project.TargetFrameworks.Count > 1; 491for (int i = 0; i < assetsFile.Libraries.Count; ++i) 632var lockContentFiles = new List<LockFileContentFile>(pkg.Key.ContentFiles.Count); 856if (items == null || items.Count == 0) 865for (int i = 0; i < items.Count; ++i)
RestoreCommand\Utility\LockFileUtils.cs (8)
437if (lockFileLib.CompileTimeAssemblies.Count > 0 || lockFileLib.RuntimeAssemblies.Count > 0) 462if (contentItems.HasContract && lockFileLib.RuntimeAssemblies.Count > 0 && !framework.IsDesktop()) 635if (compileGroup.Count > 0) 684var results = new List<LockFileItem>(items.Count); 724result = new(group.Items.Count); 869if (items.Count > 0) 1223for (var i = 0; i < lockFileLib.Build.Count; i++)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (2)
405for (int i = framework.ProjectReferences.Count - 1; i >= 0; i--) 847for (int i = 0; i < spec.TargetFrameworks.Count; i++)
RestoreCommand\Utility\NoOpRestoreUtilities.cs (2)
242var pathResolvers = new List<VersionFolderPathResolver>(request.Project.RestoreMetadata.FallbackFolders.Count + 1) 252var packageFiles = new List<string>(lockFile.Libraries.Count + request.Project.TargetFrameworks.Sum(i => i.DownloadDependencies.Length));
RestoreCommand\Utility\SpecValidationUtility.cs (7)
152List<NuGetFramework> frameworkNames = new List<NuGetFramework>(spec.TargetFrameworks.Count); 208if (spec.RestoreMetadata.OriginalTargetFrameworks.Count < 1) 219List<string> aliases = (spec.TargetFrameworks.Count > 1 || spec.RestoreMetadata.TargetFrameworks.Count > 1) ? 224if (spec.RestoreMetadata.TargetFrameworks.Count > 1) 238if (spec.TargetFrameworks.Count > 1) 261|| spec.TargetFrameworks.Count != 1)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
VerifyCommand\VerifyCommandRunner.cs (1)
32if (verifyArgs.Verifications.Count == 0)
NuGet.Common (1)
Telemetry\TelemetryEvent.cs (1)
35public int Count => _properties.Count;
NuGet.Configuration (29)
Settings\Settings.cs (3)
226for (int i = settingsFiles.Count - 1; i >= 0; i--) 393if (configFilePaths == null || configFilePaths.Count == 0) 410if (configFilePaths == null || configFilePaths.Count == 0)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.Credentials (2)
_generated\2\PluginCredentialResponseJsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
_generated\4\PluginCredentialResponseJsonContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
NuGet.DependencyResolver.Core (16)
GraphModel\GraphNode.cs (1)
43var pCount = ParentNodes.Count;
GraphModel\GraphOperations.cs (6)
147var count = innerNodes.Count; 226var count = innerNodes.Count; 418var count = innerNodes.Count; 644var count = innerNodes.Count; 654var count = innerNodes.Count; 945for (var i = 0; i < children.Count; i++)
Remote\RemoteWalkContext.cs (1)
78for (int i = 0; i < RemoteLibraryProviders.Count; ++i)
ResolverUtility.cs (1)
587if (remoteDependencyProviders.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
NuGet.Frameworks (8)
FrameworkNameProvider.cs (1)
973destination.Add(framework, destination.Count);
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
NuGet.LibraryModel (26)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.PackageManagement (40)
Audit\AuditChecker.cs (1)
265for (int i = 0; i < auditInfo.Projects.Count; i++)
BuildIntegration\BuildIntegratedRestoreUtility.cs (1)
169for (var i = 0; i < lockFile.PackageSpec.TargetFrameworks.Count; i++)
BuildIntegration\DependencyGraphRestoreUtility.cs (2)
283for (int frameworkCount = 0; frameworkCount < packageSpec.RestoreMetadata.TargetFrameworks.Count; frameworkCount++) 285for (var projectReferenceCount = 0; projectReferenceCount < packageSpec.RestoreMetadata.TargetFrameworks[frameworkCount].ProjectReferences.Count; projectReferenceCount++)
NuGetPackageManager.cs (1)
3336TargetFrameworkInformation matchingTfi = projectAction.RestoreResult.LockFile.PackageSpec.TargetFrameworks.Count == 1 ?
Projects\ProjectJsonNuGetProject.cs (1)
203if (packageSpec.TargetFrameworks != null && packageSpec.TargetFrameworks.Count == 1)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
Utility\CollectionsUtility.cs (1)
29return toRemove.Count;
Utility\PackagesConfigLockFileUtility.cs (5)
194if (lockFile.Targets.Count == 0) 198else if (lockFile.Targets.Count > 1) 201while (lockFile.Targets.Count > 1) 205for (var i = 0; i < target.Dependencies.Count; i++) 247for (var i = 0; i < dependencies.Count; i++)
NuGet.Packaging (35)
_generated\3\NupkgMetadataSerializationContext.g.cs (1)
62for (int i = 0; i < options.Converters.Count; i++)
ContentModel\ContentItemCollection.cs (1)
122list.Capacity = Math.Max(list.Capacity, contentItemGroupList.Count + groupAssets.Count);
Rules\DependenciesGroupsForEachTFMRule.cs (3)
111if (noExactMatchesFromFile.Count != 0) 135if (noExactMatchesFromNuspec.Count != 0) 162if (compatNotExactMatches.Count != 0)
Rules\UpholdBuildConventionRule.cs (1)
44if (expectedFiles.Count == 0)
RuntimeModel\RuntimeGraph.cs (1)
158if (compatProfile.Value.RestoreContexts.Count > 0)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
NuGet.ProjectModel (77)
_generated\11\CacheFileSourceGen.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\22\AssetsLogMessageSourceGen.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
_generated\6\CacheFileSourceGen.IListIAssetsLogMessage.g.cs (1)
59for (int i = 0; i < value.Count; i++)
_generated\7\CacheFileSourceGen.IListString.g.cs (1)
59for (int i = 0; i < value.Count; i++)
LockFile\LockFile.cs (2)
84if (LogMessages.Count != otherLogMessages.Count)
LockFile\LockFileFormat.cs (15)
217if (lockFile.LogMessages.Count > 0) 393if (library.Dependencies.Count > 0) 401if (library.FrameworkAssemblies.Count > 0) 409if (library.CompileTimeAssemblies.Count > 0) 417if (library.AnalyzerAssets.Count > 0) 425if (library.RuntimeAssemblies.Count > 0) 433if (library.FrameworkReferences.Count > 0) 441if (library.ResourceAssemblies.Count > 0) 449if (library.NativeLibraries.Count > 0) 457if (library.ContentFiles.Count > 0) 465if (library.Build.Count > 0) 473if (library.BuildMultiTargeting.Count > 0) 481if (library.RuntimeTargets.Count > 0) 489if (library.ToolsAssemblies.Count > 0) 497if (library.EmbedAssemblies.Count > 0)
LockFile\LockFileTargetLibrary.cs (2)
206IList<T>? thisList = thisValue is IList<T> { Count: not 0 } list1 ? list1 : null; 207IList<T>? thatList = thatValue is IList<T> { Count: not 0 } list2 ? list2 : null;
LockFile\Utf8JsonStreamLockFileConverter.cs (1)
217if (!string.IsNullOrEmpty(projectPath) && lockFile.LogMessages.Count > 0)
MacroStringsUtility.cs (1)
27for (int i = 0; i < list.Count; i++)
PackageSpecOperations.cs (5)
39for (var i = 0; i < spec.TargetFrameworks.Count; i++) 71for (var i = 0; i < spec.TargetFrameworks.Count; i++) 125for (var i = 0; i < spec.TargetFrameworks.Count; i++) 151for (var i = 0; i < spec.TargetFrameworks.Count; i++) 234for (var i = 0; i < spec.TargetFrameworks.Count; i++)
PackageSpecWriter.cs (9)
223if (msbuildMetadata.TargetFrameworks?.Count > 0) 280if (msbuildMetadata.Files?.Count > 0) 295if (msbuildMetadata.Sources?.Count > 0) 313msbuildMetadata.ProjectWideWarningProperties.NoWarn.Count > 0 || 314msbuildMetadata.ProjectWideWarningProperties.WarningsAsErrors.Count > 0)) 320if (msbuildMetadata.ProjectWideWarningProperties.NoWarn.Count > 0) 330if (msbuildMetadata.ProjectWideWarningProperties.WarningsAsErrors.Count > 0) 340if (msbuildMetadata.ProjectWideWarningProperties.WarningsNotAsErrors.Count > 0) 523if (frameworks.Count > 0)
ProjectLockFile\PackagesLockFileFormat.cs (1)
329if (dependency.Dependencies?.Count > 0)
ProjectLockFile\PackagesLockFileUtilities.cs (9)
111if (project.TargetFrameworks.Count != lockFileFrameworks.Length) 334if (expected.Targets.Count != actual.Targets.Count) 343for (var i = 0; i < actual.Targets.Count; i++) 367if (actualTarget.Dependencies.Count != expectedTarget.Dependencies.Count) 387actualTarget.Dependencies.Count, 485if (transitiveDependencies != projectDependency.Dependencies.Count && packagesToPrune?.Count == 0) 493projectDependency.Dependencies.Count > 0 ? string.Join(",", projectDependency.Dependencies.Select(dep => dep.Id).OrderBy(dep => dep)) : Strings.None
ProjectRestoreMetadata.cs (2)
258var setSources = new HashSet<string>(sources.Count, StringComparer.OrdinalIgnoreCase); 260for (var i = 0; i < sources.Count; i++)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.Protocol (34)
_generated\142\JsonContext.g.cs (1)
67for (int i = 0; i < options.Converters.Count; i++)
_generated\154\RepositorySignatureJsonContext.g.cs (1)
64for (int i = 0; i < options.Converters.Count; i++)
_generated\35\PackageSearchJsonContext.g.cs (1)
66for (int i = 0; i < options.Converters.Count; i++)
_generated\40\PluginCacheJsonContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
_generated\86\PluginJsonContext.IListString.g.cs (1)
57for (int i = 0; i < value.Count; i++)
_generated\94\PluginJsonContext.g.cs (1)
59for (int i = 0; i < options.Converters.Count; i++)
DependencyInfo\RegistrationInfo.cs (1)
23return string.Format(CultureInfo.InvariantCulture, "{0} Packages: {1}", Id, Packages.Count);
DependencyInfo\Trim.cs (1)
105if (dependencyInfo.RegistrationInfo.Packages.Count == 0)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.Resolver (5)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
NuGet.Versioning (28)
src\nuget-client\build\Shared\EqualityUtility.cs (21)
61if (self.Count != other.Count) 66if (self.Count == 0) 71if (self.Count == 1) 103if (self.Count != other.Count) 108if (self.Count == 0) 113if (self.Count == 1) 161if (self.Count != other.Count) 166if (self.Count == 0) 194if (self.Count != other.Count) 199if (self.Count == 0) 209if (self.Count == 1) 233if (self.Count != other.Count) 238if (self.Count == 0) 270if (self.Count != other.Count) 275if (self.Count == 0)
src\nuget-client\build\Shared\NoAllocEnumerateExtensions.cs (5)
77if (list.Count == 0) 113EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 209if (source is ICollection<T> { Count: 0 } or IReadOnlyCollection<T> { Count: 0 }) 258EnumeratorKind.IList => ++_iListIndex < _iList!.Count, 359if (dictionary.Count == 0)
src\nuget-client\build\Shared\SharedExtensions.cs (2)
133for (var index = 0; index < lst.Count; index++) 157for (var index = 0; index < lst.Count; index++)
PresentationBuildTasks (11)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\internal\Media\ParserStreamGeometryContext.cs (2)
669_bw.Write(points.Count); 672for(int i = 0; i < points.Count; i++)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
4928for( int i = 0; i < attributes.Count; i++ )
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (3)
216for(int i=0; i<allAttributes.Count; i++) 237for (int i = 0; i<constructorArguments.Count; i++) 257for (int i=0; i<constructorArguments.Count; i++)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (5)
254for (int j = 0; j < list.Count; j++) 287for (int j = 0; j < list.Count && !attributeDataFound; j++) 331if (constructorArguments.Count == 1 && !noArgs) 350else if (constructorArguments.Count == 0) 490for (int j = 0; j < list.Count; j++)
PresentationCore (148)
MS\Internal\FontCache\FamilyCollection.cs (1)
675return _fontCollection.FamilyCount + (UseSystemFonts ? SystemCompositeFonts.NumOfSystemCompositeFonts : checked((uint)UserCompositeFonts.Count));
MS\Internal\FontCache\FontSourceCollection.cs (1)
107fontSources = new List<Text.TextInterface.IFontSource>(files.Count);
MS\Internal\FontFace\FontDriver.cs (2)
255if (glyphs == null || glyphs.Count == 0) 259glyphArray = new ushort[glyphs.Count];
MS\Internal\IListConverters.cs (9)
116StringBuilder builder = new StringBuilder(EstimatedCharCountPerItem * list.Count); 117for (int i = 0; i < list.Count; i++) 157StringBuilder builder = new StringBuilder(EstimatedCharCountPerItem * list.Count); 158for (int i = 0; i < list.Count; i++) 198StringBuilder builder = new StringBuilder(EstimatedCharCountPerItem * list.Count); 199for (int i = 0; i < list.Count; i++) 240StringBuilder builder = new StringBuilder(EstimatedCharCountPerItem * list.Count); 241for (int i = 0; i < list.Count; i++) 280char[] chars = new char[list.Count];
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (1)
195count = (uint)collection.Count;
MS\Internal\Media\ParserStreamGeometryContext.cs (2)
669_bw.Write(points.Count); 672for(int i = 0; i < points.Count; i++)
MS\Internal\Shaping\TypefaceMap.cs (3)
442for(i = 0; i < _cachedScaledTypefaces.Count; i++) 448if(i == _cachedScaledTypefaces.Count) 451i = _cachedScaledTypefaces.Count;
MS\Internal\TextFormatting\Bidi.cs (2)
1759Invariant.Assert(levels != null && levels.Count >= cchText); 1760Invariant.Assert(characterClass != null && characterClass.Count >= cchText);
MS\Internal\TextFormatting\FormattedTextSymbols.cs (3)
71Debug.Assert(shapeables != null && shapeables.Count > 0); 74_glyphs = new Glyphs[shapeables.Count]; 82while (i < shapeables.Count)
MS\Internal\TextFormatting\FullTextLine.cs (1)
2041return boundsList.Count > 0 ? boundsList : null;
MS\Internal\TextFormatting\FullTextState.cs (4)
183int lsTbdCount = pap.Tabs != null ? pap.Tabs.Count : 0; 188if (pap.Tabs != null && pap.Tabs.Count > 0) 190lsTbdCount = pap.Tabs.Count + 1; 210if (pap.Tabs != null && pap.Tabs.Count > 0)
MS\Internal\TextFormatting\LineServicesRun.cs (1)
252for (int i = 0; i < _textEffects.Count; i++)
MS\Internal\TextFormatting\SimpleTextLine.cs (3)
871(boundsList == null || boundsList.Count == 0 ? null : boundsList) 913for (int i = 0; i < displayGlyphAdvances.Count; i++) 1759for (int i = 0; i < displayGlyphAdvances.Count; i++)
MS\Internal\TextFormatting\TextStore.cs (1)
1702int shapeablesCount = shapeables.Count;
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (1)
43InitArrays(realValues.Count);
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (1)
37InitArrays(emSize, pointValues.Count);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PartialList.cs (1)
35Debug.Assert(initialIndex >= 0 && initialIndex + count <= list.Count);
System\Windows\FreezableCollection.cs (1)
661return enumerableAsICollectionT.Count;
System\Windows\Ink\Stroke.cs (1)
1150return icol.Count;
System\Windows\Input\ManipulationLogic.cs (3)
360int numManipulators = manipulators.Count; 387int count = parameters.Count; 388for (int i = 0; i < parameters.Count; i++)
System\Windows\Media\Animation\AnimationLayer.cs (10)
29|| (newAnimationClocks.Count > 0 105int count = _animationClocks.Count; 119Debug.Assert(animationClocks.Count > 0); 125int count = animationClocks.Count; 146&& _animationClocks.Count > 0, 169if (_animationClocks.Count == 0) 186Debug.Assert(newAnimationClocks.Count > 0); 190int newClocksCount = newAnimationClocks.Count; 196int oldClocksCount = (_animationClocks == null) ? 0 : _animationClocks.Count; 259int count = _animationClocks.Count;
System\Windows\Media\Animation\AnimationStorage.cs (5)
590Debug.Assert(animationClocks.Count > 0, 645storage._animationClocks = new FrugalObjectList<AnimationClock>(animationClocks.Count); 647for (int i = 0; i < animationClocks.Count; i++) 661FrugalObjectList<AnimationClock> newClockCollection = new FrugalObjectList<AnimationClock>(storage._animationClocks.Count + animationClocks.Count); 670for (int i = 0; i < animationClocks.Count; i++)
System\Windows\Media\ByteStreamGeometryContext.cs (1)
635int count = points.Count;
System\Windows\Media\CultureSpecificStringDictionary.cs (4)
65get { return _innerDictionary.Count; } 115if (_innerDictionary.Count > array.Length - index) 149if (_innerDictionary.Count > array.Length - index) 439get { return _innerDictionary.Count; }
System\Windows\Media\FamilyTypefaceCollection.cs (1)
35_count = innerList.Count;
System\Windows\Media\GlyphRun.cs (59)
337(glyphIndices.Count > 0) && 338(glyphIndices.Count <= MaxGlyphCount) && 339(advanceWidths.Count == glyphIndices.Count) && 340((glyphOffsets == null) || ((glyphOffsets != null) && (glyphOffsets.Count != 0) && (glyphOffsets.Count == glyphIndices.Count)))) 360if (characters != null && characters.Count != 0) 362if (clusterMap != null && clusterMap.Count != 0) 364if (clusterMap.Count == characters.Count) 371int mapCount = clusterMap.Count; 398throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), nameof(clusterMap)); 403if (GlyphCount != characters.Count) 408if (caretStops != null && caretStops.Count != 0) 410if (caretStops.Count != CodepointCount + 1) 432if (glyphIndices.Count <= 0) 435if (glyphIndices.Count > MaxGlyphCount) 442if (advanceWidths.Count != glyphIndices.Count) 443throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(advanceWidths)); 445if (glyphOffsets != null && glyphOffsets.Count != 0 && glyphOffsets.Count != glyphIndices.Count) 446throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(glyphOffsets)); 480IList<bool> caretStops = CaretStops != null && CaretStops.Count != 0 ? CaretStops : new DefaultCaretStopList(CodepointCount); 520if (currentCodepoint >= clusterMap.Count || clusterMap[currentCodepoint] != clusterMap[clusterCodepointStart]) 528if (currentCodepoint >= clusterMap.Count) 529clusterGlyphEnd = advances.Count; 536if (caretCodePoint < currentCodepoint || currentCodepoint >= clusterMap.Count) 572IList<bool> caretStops = CaretStops != null && CaretStops.Count != 0 ? CaretStops : new DefaultCaretStopList(CodepointCount); 592for (int i = 1; i < caretStops.Count; ++i) 594if (i < clusterMap.Count && clusterMap[i] == clusterMap[currentClusterStart]) 600ushort lastGlyphInCluster = i < clusterMap.Count ? clusterMap[i] : (ushort)advances.Count; 639if (caretStops[caretStops.Count - 1]) 642secondStopIndex = caretStops.Count - 1; 655if (caretStops[caretStops.Count - 1]) 656return new CharacterHit(caretStops.Count - 1, 0); 678return new CharacterHit(firstStopIndex, caretStops.Count - 1 - firstStopIndex); 706IList<bool> caretStops = CaretStops != null && CaretStops.Count != 0 ? CaretStops : new DefaultCaretStopList(CodepointCount); 753IList<bool> caretStops = CaretStops != null && CaretStops.Count != 0 ? CaretStops : new DefaultCaretStopList(CodepointCount); 996if (CaretStops == null || CaretStops.Count == 0) 1083if (value.Count <= 0) 1113if (value.Count <= 0) 1190if (_glyphOffsets == null || _glyphOffsets.Count == 0) 1199return _glyphIndices.Count; 1208if (_characters != null && _characters.Count != 0) 1209return _characters.Count; 1210if (_clusterMap != null && _clusterMap.Count != 0) 1211return _clusterMap.Count; 1212return _glyphIndices.Count; 1235int glyphIndicesCount = _glyphIndices.Count; 1897if (_glyphOffsets != null && _glyphOffsets.Count != 0) 1961if (_glyphOffsets != null && _glyphOffsets.Count != 0) 2005if (_glyphOffsets != null && _glyphOffsets.Count != 0) 2031if (characterIndex < 0 || characterIndex >= caretStops.Count) 2048for (int i = characterIndex + 1; i < caretStops.Count; ++i) 2064for (int lastStop = caretStopIndex + 1; lastStop < caretStops.Count; ++lastStop)
System\Windows\Media\GlyphsSerializer.cs (14)
53(_characters == null ? 0 : _characters.Count), 54_indices.Count 76for (characterIndex = 0; characterIndex < _clusters.Count; ++characterIndex) 100Debug.Assert(_indices.Count > glyphClusterStart - _glyphClusterInitialOffset); 101AddCluster(glyphClusterStart - _glyphClusterInitialOffset, _indices.Count, charClusterStart, characterIndex); 106Debug.Assert(_characters == null || _characters.Count == 0 || _indices.Count == _characters.Count); 107for (int i = 0; i < _indices.Count; ++i) 115if (_characters == null || _characters.Count == 0) 121StringBuilder builder = new StringBuilder(_characters.Count); 246if (_characters != null && _characters.Count != 0) 267for (int i = _caretStops.Count - 1; i >= 0; --i) 274lastCaretStop = Math.Min(i | 3, _caretStops.Count - 1);
System\Windows\Media\GlyphTypeface.cs (3)
227if (glyphs.Count <= 0) 230if (glyphs.Count > ushort.MaxValue) 386IDictionary<XmlLanguage, string> adjustedLanguageFaceNames = new Dictionary<XmlLanguage, string>(adjustedFaceNames.Count);
System\Windows\Media\Imaging\BitmapEncoder.cs (4)
335int count = _frames.Count; 377if (_palette != null && _palette.Colors.Count > 0) 657if (colorContexts != null && colorContexts.Count > 0) 659int count = colorContexts.Count;
System\Windows\Media\Imaging\BitmapPalette.cs (2)
33int count = colors.Count; 268int numColors = Math.Min(256, _colors.Count);
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
183else if ((1 << DestinationFormat.BitsPerPixel) < DestinationPalette.Colors.Count)
System\Windows\Media\PathStreamGeometryContext.cs (1)
312int count = points.Count;
System\Windows\ReverseInheritProperty.cs (1)
69int otherCount = (otherOrigins != null) ? otherOrigins.Count : 0;
PresentationFramework (136)
Microsoft\Win32\CommonItemDialog.cs (1)
415if (places != null && places.Count != 0)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (6)
108int firstPage = pageEl.Count; 116if (pageEl.Count > 0 && ((FixedPageProxy)pageEl[pageEl.Count - 1]).Page == startPage) 196if (fp.Segments.Count == 0) 203part.NameValuePairs.Add(TextSelectionProcessor.CountAttribute, fp.Segments.Count.ToString(NumberFormatInfo.InvariantInfo)); 205for (int i = 0; i < fp.Segments.Count; i++)
MS\Internal\Annotations\Anchoring\LocatorManager.cs (13)
265if (locators.Count > 0) 283ContentLocator[] lists = new ContentLocator[locators.Count]; 666if (newLocators != null && newLocators.Count > 0) 714if (locatorParts != null && locatorParts.Count > 0) 716List<ContentLocatorBase> tempLocators = new List<ContentLocatorBase>(locatorsToReturn.Count * locatorParts.Count); 759if (tempLocators != null && tempLocators.Count > 0) 940if (locators.Count > 0) 948if (locators.Count == 1) 956if (locators.Count > 2) 960for (int i = 1; i < locators.Count - 1; i++) 980data = ResolveSingleLocator(ref selection, ref attachmentLevel, AttachmentLevel.EndPortion, locators[locators.Count - 1], offset, startNode, skipStartNode); 1207if (additionalLocators == null || additionalLocators.Count == 0) 1215for (int i = 1; i < additionalLocators.Count; i++)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (2)
154for (int i = 0; i < textSegments.Count; i++) 161part.NameValuePairs.Add(CountAttribute, textSegments.Count.ToString(NumberFormatInfo.InvariantInfo));
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (2)
230if (segments != null && segments.Count > 0) 233ITextPointer end = segments[segments.Count - 1].End;
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (9)
370ind = ind + res.Count - 1; 622_owners = new List<IHighlightRange>(owners.Count); 638Debug.Assert(owners.Count > 0, "empty owners list"); 639for (int i = 0; i < owners.Count; i++) 823for (int i = 0; i < r1.Count; i++) 828for (int j = 0; j < r2.Count; j++) 847if ((res != null) && (res.Count > 0) && (newOwner != null)) 850if (res.Count == 3) 865Debug.Assert(res.Count == 2, "unexpected resulting segment count after split");
MS\Internal\Annotations\TextAnchor.cs (1)
593List<TextSegment> orderedList = new List<TextSegment>(textSegments.Count);
MS\Internal\Data\DifferencingCollection.cs (1)
49int n = list.Count;
MS\Internal\Documents\TextBoxLine.cs (5)
260Invariant.Assert(textBounds.Count > 0); 262for (int boundIndex = 0; boundIndex < textBounds.Count; boundIndex++) 371return (((TextSpan<TextRun>)runs[runs.Count - 1]).Value is TextEndOfParagraph); 497Invariant.Assert(textBounds != null && textBounds.Count == 1, "Expecting exactly one TextBounds for a single text position."); 502Invariant.Assert(runBounds.Count == 1, "Expecting exactly one TextRunBounds for a single text position.");
MS\Internal\Documents\TextBoxView.cs (2)
2045for (int i = 0; i < bounds.Count; i++) 2124for (int i = 0; i < bounds.Count; i++)
MS\Internal\Globalization\BamlTreeUpdater.cs (3)
267Hashtable uidSubstitutions = new Hashtable(newChildren.Count); 328while (nodeIndex < newChildren.Count) 365for (; nodeIndex < newChildren.Count; nodeIndex++)
MS\Internal\Ink\InkCanvasSelection.cs (3)
558if ( elements.Count > 0 ) 1023if ( elements1.Count != elements2.Count )
MS\Internal\PtsHost\Line.cs (10)
507Invariant.Assert(textBounds.Count > 0); 509for (int boundIndex = 0; boundIndex < textBounds.Count; boundIndex++) 633Invariant.Assert(collapsedRanges.Count == 1, "Multiple collapsed ranges are not supported."); 697cchGlyphRuns -= (glyphRun.Characters == null ? 0 : glyphRun.Characters.Count); 712int characterCount = (run.Characters == null ? 0 : run.Characters.Count); 852return (((TextSpan<TextRun>)_runs[_runs.Count-1]).Value is ParagraphBreakRun); 928TextRun run = ((TextSpan<TextRun>)_runs[_runs.Count - 1]).Value as TextRun; 1001Invariant.Assert(textBounds != null && textBounds.Count == 1, "Expecting exactly one TextBounds for a single text position."); 1005Debug.Assert(runBounds.Count == 1, "Expecting exactly one TextRunBounds for a single text position."); 1073cchGlyphRuns += (glyphRun.Characters == null ? 0 : glyphRun.Characters.Count);
MS\Internal\PtsHost\PtsHost.cs (2)
1517for(int breakIndex = 0; breakIndex < Math.Min(textBreakpoints.Count, nLineVariantsAlloc); breakIndex++) 1562nLineVariantsActual = textBreakpoints.Count;
MS\Internal\PtsHost\TextParaClient.cs (2)
1902for (int i = 0, count = rectangles.Count; i < count; ++i) 2014for (int i = 0, count = rectangles.Count; i < count; ++i)
MS\Internal\Text\Line.cs (6)
173Invariant.Assert(textBounds.Count > 0); 176for (int boundIndex = 0; boundIndex < textBounds.Count; boundIndex++) 309Debug.Assert(collapsedRanges.Count == 1, "Multiple collapsed ranges are not supported."); 415return (((TextSpan<TextRun>)runs[runs.Count-1]).Value is TextEndOfParagraph); 467Invariant.Assert(textBounds != null && textBounds.Count == 1, "Expecting exactly one TextBounds for a single text position."); 472Debug.Assert(runBounds.Count == 1, "Expecting exactly one TextRunBounds for a single text position.");
System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
368if (locators.Count > 0) 371ContentLocator[] lists = new ContentLocator[locators.Count];
System\Windows\Annotations\AnnotationHelper.cs (7)
244if (attachedAnnotations.Count > 0) 624Debug.Assert((textSegments != null) && (textSegments.Count > 0), "Invalid selection TextSegments"); 626if ((attachedAnnotations != null) && (attachedAnnotations.Count > 0)) 634for (int i = attachedAnnotations.Count - 1; i >= 0; i--) 678Invariant.Assert(locators != null && locators.Count > 0); 776List<IAttachedAnnotation> attachedAnnotations = new List<IAttachedAnnotation>(annotations.Count); 1057Invariant.Assert(locators != null && locators.Count > 0, "No locators generated for selection.");
System\Windows\Annotations\AnnotationService.cs (7)
855List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(attachedAnnotations.Count); 995if (attachedAnnotations?.Count > 0) 1299if (annotations.Count > 0) 1302IAttachedAnnotation[] list = new IAttachedAnnotation[annotations.Count]; 1362if (annotations.Count > 0) 1365IAttachedAnnotation[] list = new IAttachedAnnotation[annotations.Count]; 1402IAttachedAnnotation[] list = new IAttachedAnnotation[annotations.Count];
System\Windows\Annotations\LocatorPart.cs (1)
100if (part.NameValuePairs.Count != _nameValues.Count)
System\Windows\Annotations\LocatorPartList.cs (3)
352if (additionalLocatorParts == null || additionalLocatorParts.Count == 0) 359results = new List<ContentLocatorBase>(additionalLocatorParts.Count); 361for (int i = 1; i < additionalLocatorParts.Count; i++)
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (4)
328this.OwningDataGrid.SelectedCells.Count == 1 && e.AddedCells.Count == 1) 338for (i = 0; i < e.AddedCells.Count; i++) 347for (i = 0; i < e.RemovedCells.Count; i++)
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (1)
700this.OwningDataGrid.SelectedCells.Count > 0)
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (4)
142if (columns != null && columns.Count > 0) 163if (startIndex == 0 || startIndex == columns.Count) 167if (propertyId == 0 && startIndex < columns.Count) 174for (int i = startIndex; i < columns.Count; i++)
System\Windows\Controls\CustomDictionarySources.cs (1)
278get { return ((IList<Uri>)this).Count; }
System\Windows\Controls\TextBlock.cs (2)
2316if (aryTextBounds.Count > 0) 2319int c = aryTextBounds.Count;
System\Windows\Controls\Validation.cs (1)
368for (int groupIndex = 0; groupIndex < groups.Count; ++groupIndex)
System\Windows\Data\BindingGroup.cs (2)
851for (int i=newItems.Count-1; i>=0; --i) 1263for (int i=0, n=list.Count; i<n; ++i)
System\Windows\Documents\DocumentReferenceCollection.cs (2)
63int count = _InternalList.Count; 89return _InternalList.Count;
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
73DocumentsTrace.FixedDocumentSequence.Highlights.Trace($"DSHL.RaiseHighlightChangedEvent ranges={ranges.Count}"); 74Debug.Assert(ranges.Count > 0);
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
695Debug.Assert(args.Ranges.Count > 0 && args.Ranges[0].Start.CompareTo(args.Ranges[0].End) < 0); 714while (idxScan < args.Ranges.Count)
System\Windows\Documents\FixedDocument.cs (2)
1035Debug.Assert(args.Ranges.Count > 0 && args.Ranges[0].Start.CompareTo(args.Ranges[0].End) < 0); 1138for (int i = 0; i < ranges.Count; i++)
System\Windows\Documents\FixedHighlight.cs (1)
135int chrct = (run.Characters == null ? 0 : run.Characters.Count);
System\Windows\Documents\FixedSOMElement.cs (1)
87endIndex = glyphRun.Characters == null ? 0 : glyphRun.Characters.Count;
System\Windows\Documents\FixedSOMPageConstructor.cs (6)
152for (int i = 0; i <points.Count; i ++) 160_lastPoint = points[points.Count - 1]; 165for (int i = 0; i < points.Count; i++) 174_lastPoint = points[points.Count - 1]; 180_lastPoint = points[points.Count - 1]; 434if (glyphRun.ClusterMap != null && glyphRun.ClusterMap.Count > 0)
System\Windows\Documents\FixedTextView.cs (3)
513int characterCount = (run.Characters == null) ? 0 : run.Characters.Count; 964int characterCount = (run.Characters == null) ? 0 : run.Characters.Count; 990charCount = run.Characters.Count;
System\Windows\Documents\FlowDocument.cs (2)
1395if (args.Ranges.Count > 0) 1407for (i = 0; i < args.Ranges.Count; i++)
System\Windows\Documents\PageContentCollection.cs (2)
58int index = InternalList.Count - 1; 106get { return InternalList.Count; }
System\Windows\Documents\RubberbandSelector.cs (1)
468int characterCount = (run.Characters == null) ? 0 : run.Characters.Count;
System\Windows\ResourceDictionary.cs (5)
1181else if (keys.Count > 0) 1259_numDefer = keyCollection.Count; 1265for (int i = 0; i < keyCollection.Count; i++) 1328Debug.Assert(staticResources != null && staticResources.Count > 0); 1329for (int i = 0; i < staticResources.Count; i++)
System\Windows\Shell\JumpList.cs (2)
60|| (rejectedItems != null && reasons != null && rejectedItems.Count != reasons.Count))
System\Windows\Standard\Utilities.cs (1)
141for (int i = 0; i < frames.Count && bestScore != 0; ++i)
System\Windows\VisualStateManager.cs (1)
168for (int groupIndex = 0; groupIndex < groups.Count; ++groupIndex)
PresentationUI (8)
MS\Internal\Documents\RightsManagementManager.cs (4)
1075if (newGrants == null || newGrants.Count == 0) 1091if (newGrants.Count != allRights.Count) 1298if (licenses != null && licenses.Count > 0)
MS\Internal\Documents\RightsManagementProvider.cs (2)
547grantDictionary.Count); 671if (licenses.Count > 0)
MS\Internal\Documents\RMPermissions.cs (1)
129string[] stringArray = new string[rightsStrings.Count];
MS\Internal\Documents\RMPublishingDialog.cs (1)
55if (grantDictionary != null && grantDictionary.Count != 0)
ReachFramework (35)
AlphaFlattener\PrimitiveList.cs (1)
172for (int i = 0; i < chars.Count; i ++)
AlphaFlattener\Utility.cs (5)
2724_count += points.Count; 2728for (int index = 0; index < points.Count && IsRectangle; index++) 2734AddLineSegments(points.Count); 2742_count += (points.Count + 1) / 2 * 3; 2750_count += (points.Count + 2) / 3 * 3;
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (2)
304if (paperSizes.Count > 0) 333if (0 <= defaultPaperSizeIndex && defaultPaperSizeIndex < paperSizes.Count)
MS\Internal\Printing\MostFrequentlyUsedCache.cs (2)
27while(this._dictionary.Count >= this._maxEntries) 32Debug.Assert(this._dictionary.Count <= this._maxEntries);
Packaging\XpsFixedDocumentReaderWriter.cs (1)
861if (linkTargetStream.Count != 0)
PrintConfig\PrintCapabilitesWriter.cs (16)
164if (nUps.Count > 0) 255if (bins.Count > 0) 262for (int i = 0; i < bins.Count; i++) 306string optionDisplayName = (i < binDisplayNames.Count) ? binDisplayNames[i] : null; 324if (paperSizeCodes.Count > 0) 331for (int i = 0; i < paperSizeCodes.Count; i++) 349((i < paperSizeDisplayNames.Count) || (i < paperSizes.Count))) 351string optionDisplayName = (i < paperSizeDisplayNames.Count) ? paperSizeDisplayNames[i] : null; 354if (i < paperSizes.Count) 382if (mediaTypes.Count > 0 && mediaTypeDisplayNames.Count > 0) 389for (int i = 0; i < mediaTypes.Count; i++) 414optionDisplayName = (i < mediaTypeDisplayNames.Count) ? mediaTypeDisplayNames[i] : null; 490if(resolutions.Count > 0) 497for (int i = 0; i < resolutions.Count; i++)
PrintConfig\PrintSchemaShim.cs (4)
410if (bins.Count < 1) 424if (mediaTypes.Count < 1) 438if (papers.Count < 1) 471for (int i = 0; i < points.Count; i++)
Serialization\ImageSourceTypeConverter.cs (1)
354&& bitmapSource.Palette.Colors.Count > 0)
Serialization\VisualSerializer.cs (3)
1603for (int i = 0; i < glyphRun.Characters.Count; i++) 2135if (serializeGlyphRun.Characters.Count > MaxGlyphCount) 2145if (serializeGlyphRun.GlyphIndices.Count > MaxGlyphCount)
Roslyn.Diagnostics.Analyzers (52)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (5)
44for (int i = 0, count = list.Count; i < count; i++) 87if (items is ICollection<T> collection && collection.Count == 0) 203return genericCollection.Count == 0; 231return source.Count == 0; 790return (list.Count == 1) ? list[0] : default;
src\roslyn\src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
src\roslyn\src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (3)
34var items = new KeyValuePair<K, V>[_dict.Count]; 55var items = new TKey[_collection.Count]; 76var items = new TValue[_collection.Count];
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (7)
122var count = coll.Count; 448if (otherAsCollection.Count == 0) 588if (otherAsCollection.Count == 0) 596return otherAsCollection.Count > 0; 637if (otherAsCollection.Count == 0) 681if (otherAsCollection.Count == 0) 772otherAsCollection.Count > 0)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (3)
90for (var i = 0; i < list.Count; i++) 107for (var i = 0; i < list.Count; i++) 118for (var i = 0; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (3)
56return this.GetTextChanges(CancellationToken.None).Count > 0; 82if (_formattingResults.Count == 1) 88var count = _formattingResults.Sum(r => r.GetTextChanges(cancellationToken).Count);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (3)
235if (tokenData.Count == 0) 303for (var i = 0; i < list.Count; i++) 382for (var i = 0; i < tokenWithIndices.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
468if (t1.Count != t2.Count) 477for (var i = 0; i < t1.Count; ++i)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (3)
64CodeGenerationNamespaceInfo.GetImports(innermostNamespace).Count == 0) 93for (var i = index; i < availableIndices.Count; i++) 200Contract.ThrowIfTrue(availableIndices != null && availableIndices.Count != declarationList.Count + 1);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
Roslyn.Diagnostics.CSharp.Analyzers (18)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
375if (result.GetTextChanges(cancellationToken).Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
60for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 69return xNameParts.Count - yNameParts.Count;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
165for (var i = 0; i < list.Count - 1; i++) 178for (var i = 1; i < list.Count; i++)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
650if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
rzc (2)
ServerProtocol\ServerRequest.cs (2)
85var requestLength = args.Count + 1; 97for (var i = 0; i < args.Count; ++i)
sdk-tasks (1)
_generated\4\SdkTasksJsonSerializerContext.g.cs (1)
56for (int i = 0; i < options.Converters.Count; i++)
Shared (4)
EmptyCollections\EmptyCollectionExtensions.cs (3)
48=> collection == null || collection.Count == 0 ? EmptyReadOnlyList<T>.Instance : collection; 78=> list == null || list.Count == 0 ? EmptyReadOnlyList<T>.Instance : list; 112if (enumerable is ICollection<T> c && c.Count == 0)
Throw\Throw.cs (1)
268if (collection.Count == 0)
Shared.Tests (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Context.g.cs (1)
61for (int i = 0; i < options.Converters.Count; i++)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.g.cs (1)
58for (int i = 0; i < options.Converters.Count; i++)
System.CodeDom (1)
System\CodeDom\Compiler\CompilerInfo.cs (1)
51if (_providerOptions.Count > 0)
System.Collections (13)
src\runtime\src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
37int count = ic.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (1)
24T[] items = new T[_collection.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (3)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count]; 48TKey[] items = new TKey[_collection.Count]; 69TValue[] items = new TValue[_collection.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
42ValidateCopyToArguments(collection.Count, array, index);
System\Collections\Generic\OrderedDictionary.cs (2)
161this(dictionary?.Count ?? 0, comparer) 195this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
System\Collections\Generic\PriorityQueue.cs (2)
403if (collection is not null && (count = collection.Count) > _nodes.Length - _size) 466(count = collection.Count) > _nodes.Length - _size)
System\Collections\Generic\SortedList.cs (2)
150: this(dictionary?.Count ?? throw new ArgumentNullException(nameof(dictionary)), comparer) 152int count = dictionary.Count;
System\Collections\Generic\SortedSet.cs (1)
1323if (other is ICollection<T> c && c.Count == 0)
System.Collections.Concurrent (4)
System\Collections\Concurrent\OrderablePartitioner.cs (1)
169if (orderablePartitions.Count != partitionCount)
System\Collections\Concurrent\PartitionerStatic.cs (3)
1206get { return _sharedReader.Count; } 1493get { return _list.Count; } 1514Debug.Assert(startIndex >= 0 && endIndex <= list.Count - 1);
System.Collections.Immutable (16)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (3)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count]; 48TKey[] items = new TKey[_collection.Count]; 69TValue[] items = new TValue[_collection.Count];
System\Collections\Frozen\FrozenDictionary.cs (1)
134int capacity = (source as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0;
System\Collections\Frozen\FrozenSetInternalBase.cs (3)
37int otherCount = otherAsCollection.Count; 64int otherCount = otherAsCollection.Count; 108int otherCount = otherAsCollection.Count;
System\Collections\Immutable\ImmutableArray_1.Builder.cs (2)
1078if (indicesToRemove.Count == 0) 1098_count -= indicesToRemove.Count;
System\Collections\Immutable\ImmutableArray_1.cs (2)
1483if (indicesToRemove.Count == 0) 1489var newArray = new T[self.Length - indicesToRemove.Count];
System\Collections\Immutable\ImmutableExtensions.cs (2)
130get { return _collection.Count; } 210return _collection.Count;
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (1)
43count = collectionOfT.Count;
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
779if (otherAsICollectionGeneric.Count < origin.Count)
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
414if (otherAsICollectionGeneric.Count < this.Count)
System.CommandLine (21)
Command.cs (4)
274for (int i = 0; i < commands.Count; i++) 283for (int i = 0; i < options.Count; i++) 292for (int i = 0; i < arguments.Count; i++) 314for (var i = 0; i < parentCommand.Options.Count; i++)
Help\HelpBuilder.cs (2)
282var sb = new StringBuilder(arguments.Count * 100); 286for (var i = 0; i < arguments.Count; i++)
Parsing\ArgumentResult.cs (1)
103while (tokensToPass > 0 && nextArgumentIndex < arguments.Count)
Parsing\CommandResult.cs (2)
79for (var i = 0; i < options.Count; i++) 147for (var i = 0; i < arguments.Count; i++)
Parsing\ParseDiagramAction.cs (1)
72argumentResult.Argument.FirstParent!.Symbol is Command { HasArguments: true, Arguments.Count: > 1 };
Parsing\ParseOperation.cs (4)
104while (currentArgumentIndex < arguments.Count && 146return currentArgumentIndex < arguments.Count && 156while (_innermostCommandResult.Command.HasArguments && currentArgumentIndex < _innermostCommandResult.Command.Arguments.Count) 320if (_rootCommand is RootCommand { Directives.Count: > 0 })
Parsing\StringExtensions.cs (4)
402for (int i = 0; i < directives.Count; i++) 415for (int i = 0; i < subCommands.Count; i++) 425for (int i = 0; i < options.Count; i++) 442for (var i = 0; i < parentCommand.Options.Count; i++)
Parsing\SymbolResultTree.cs (3)
109for (var i = 0; i < command.Arguments.Count; i++) 117for (var i = 0; i < command.Options.Count; i++) 125for (var i = 0; i < command.Subcommands.Count; i++)
System.CommandLine.StaticCompletions (4)
HelpGenerationExtensions.cs (2)
45if (option.Aliases.Count == 0) 66if (command.Aliases.Count == 0)
shells\ZshShellProvider.cs (2)
120if (isMultiValued && command.Subcommands.Count == 0) 185if (command.Subcommands.Count == 0)
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (2)
148if (leftParams.Count != rightParams.Count)
System.ComponentModel.Composition (7)
Microsoft\Internal\Collections\CollectionServices.cs (5)
83if (second == null || (second.Count == 0)) 88if (source == null || (source.Count == 0)) 247if (thisList.Count != thatList.Count) 252for (int i = 0; i < thisList.Count; i++)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
83if (specifiedContractType.GetPureGenericArity() == memberGenericParameters.Count)
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePartDefinition.cs (1)
150var genericParameters = (definition.Metadata.Count > 0) ? definition.Metadata.GetValue<IEnumerable<object>>(CompositionConstants.GenericParametersMetadataName) : null;
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
97get { return ActualMetadata.Count; }
System.Composition.Runtime (4)
System\Composition\Hosting\Core\CompositionContract.cs (4)
48if (metadataConstraints?.Count == 0) throw new ArgumentOutOfRangeException(nameof(metadataConstraints)); 158if (_metadataConstraints.Count == 1) 180if (first.Count != second.Count)
System.Composition.TypedParts (3)
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
68if (metadata.Count == 0) 94if (metadata.Count == 0)
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
67if (!forKey.Any(x => x.Metadata.Count > 0))
System.Configuration.ConfigurationManager (4)
System\Configuration\ConfigurationErrorsException.cs (2)
89if (coll.Count > 1) 91_errors = new ConfigurationException[coll.Count];
System\Configuration\ErrorsHelper.cs (2)
33if (col.Count == 1) errors.Add(e); 40if ((coll == null) || (coll.Count == 0))
System.Data.Common (1)
System\Data\Common\DbConnectionStringBuilder.cs (1)
249object[] values = new object[keys.Count];
System.Diagnostics.DiagnosticSource (4)
src\runtime\src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
34int count = sortedTags.Count; 40if (tagsCol.Count != count) 85if (listCount > sortedTags.Count) 115return listCount == sortedTags.Count;
System.Diagnostics.EventLog (1)
System\Diagnostics\Reader\EventLogPropertySelector.cs (1)
24paths = new string[coll.Count];
System.Diagnostics.Process (1)
System\Diagnostics\ProcessStartInfo.cs (1)
503SafeHandle[] snapshot = new SafeHandle[list.Count];
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
1058PackUriHelper.ValidatedPartUri[] partKeys = new PackUriHelper.ValidatedPartUri[_partList.Keys.Count];
System.Linq (50)
System\Linq\AnyAll.cs (1)
20return gc.Count != 0;
System\Linq\AppendPrepend.SpeedOpt.cs (2)
23result = new TSource[c.Count + 1]; 193var result = new TSource[checked(_prependCount + c.Count + _appendCount)];
System\Linq\Concat.SpeedOpt.cs (7)
47int firstCount = firstCollection.Count; 48TSource[] result = new TSource[checked(firstCount + secondCollection.Count)]; 67int firstCount = firstCollection.Count; 75int secondCount = secondCollection.Count; 178int sourceCount = collection?.Count ?? source.Count(); 247int sourceCount = source.Count; 261int secondCount = second.Count;
System\Linq\Count.cs (2)
20return collectionoft.Count; 112count = collectionoft.Count;
System\Linq\ElementAt.cs (1)
118return (found = (uint)index < (uint)list.Count) ?
System\Linq\First.cs (1)
81if (list.Count > 0)
System\Linq\Last.cs (2)
80int count = list.Count; 127for (int i = list.Count - 1; i >= 0; --i)
System\Linq\Reverse.SpeedOpt.cs (3)
35int count = list.Count; 64int count = list.Count; 100if (list.Count > 0)
System\Linq\SegmentedArrayBuilder.cs (1)
131int collectionCount = collection.Count;
System\Linq\Select.cs (1)
280private int CountForDebugger => _source.Count;
System\Linq\Select.SizeOpt.cs (2)
89TResult[] array = new TResult[_source.Count]; 99List<TResult> list = new List<TResult>(_source.Count);
System\Linq\Select.SpeedOpt.cs (12)
515int count = _source.Count; 530int count = _source.Count; 551int count = _source.Count; 578if ((uint)index < (uint)_source.Count) 590if (_source.Count != 0) 602int len = _source.Count; 615int count = _source.Count; 874if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive) 904if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive) 916if (_source.Count > _minIndexInclusive) 928int lastIndex = _source.Count - 1; 943int count = _source.Count;
System\Linq\SequenceEqual.cs (3)
32if (firstCol.Count != secondCol.Count) 41int count = firstCol.Count;
System\Linq\Shuffle.SpeedOpt.cs (5)
52int listCount = list.Count; 177int count = list.Count; 208int listCount = list.Count; 294if (list.Count <= _takeCount) 299totalCount = list.Count;
System\Linq\Single.cs (1)
74switch (list.Count)
System\Linq\SkipTake.SpeedOpt.cs (5)
41if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive) 69if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive) 81if (_source.Count > _minIndexInclusive) 93int lastIndex = _source.Count - 1; 104public int Count => GetAdjustedCount(_minIndexInclusive, _maxIndexInclusive, _source.Count);
System\Linq\ToCollection.cs (1)
47int count = collection.Count;
System.Linq.AsyncEnumerable (1)
System\Linq\ToAsyncEnumerable.cs (1)
58int count = source.Count;
System.Linq.Expressions (34)
System\Dynamic\ExpandoObject.cs (3)
340string[] items = new string[_collection.Count]; 479object[] items = new object[_collection.Count]; 720ContractUtils.RequiresArrayRange(array, arrayIndex, _count, nameof(arrayIndex), nameof(ICollection<KeyValuePair<string, object>>.Count));
System\Dynamic\Utils\ContractUtils.cs (3)
90if (collection.Count == 0) 113for (int i = 0, n = array.Count; i < n; i++) 143ArgumentOutOfRangeException.ThrowIfLessThan(array.Count - offset, count, offsetName);
System\Dynamic\Utils\ExpressionUtils.cs (1)
287if (replacement.Count != count)
System\Linq\Expressions\BlockExpression.cs (6)
107variables == null || variables.Count == 0; 211if (expressions.Count == 2) 264if (expressions.Count == 3) 331if (expressions.Count == 4) 415if (expressions.Count == 5) 555if (expressions.Count == 1)
System\Linq\Expressions\Compiler\TypeInfoExtensions.cs (2)
23Type[] paramTypes = new Type[args.Count + 2]; 26for (int i = 0; i < args.Count; i++)
System\Linq\Expressions\DynamicExpression.cs (4)
555if (arguments != null && arguments.Count == 1) 615if (arguments != null && arguments.Count == 2) 686if (arguments != null && arguments.Count == 3) 763if (arguments != null && arguments.Count == 4)
System\Linq\Expressions\LambdaExpression.cs (4)
366parameters == null || parameters.Count == 0; 405if (parameters != null && parameters.Count == 1) 457if (parameters != null && parameters.Count == 2) 522if (parameters != null && parameters.Count == 3)
System\Linq\Expressions\MethodCallExpression.cs (10)
249arguments == null || arguments.Count == 0; 286if (arguments != null && arguments.Count == 1) 338if (arguments != null && arguments.Count == 2) 405if (arguments != null && arguments.Count == 3) 478if (arguments != null && arguments.Count == 4) 557if (arguments != null && arguments.Count == 5) 629arguments == null || arguments.Count == 0; 663if (arguments != null && arguments.Count == 1) 719if (arguments != null && arguments.Count == 2) 786if (arguments != null && arguments.Count == 3)
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
54int count = c.Count;
System.Linq.Parallel (8)
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (3)
416_elementCount = data.Count; 519int smallerChunkSize = data.Count / partitionCount; 520int biggerChunkCount = data.Count % partitionCount;
System\Linq\Parallel\QueryOperators\ListQueryResults.cs (1)
44get { return _source.Count; }
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (2)
156if (partitionerPartitions.Count != partitionCount) 182if (partitionerPartitions.Count != partitionCount)
System\Linq\ParallelEnumerable.cs (2)
1857return sourceAsCollection.Count; 1928return sourceAsCollection.Count;
System.Net.Http (3)
System\Net\Http\Headers\HttpHeaders.cs (2)
115if (values is IList<string?> { Count: 1 } valuesList) 204int count = valuesList.Count;
System\Net\Http\HttpRequestOptions.cs (1)
97var items = new KeyValuePair<string, object?>[dictionary.Count];
System.Net.NameResolution (6)
System\Net\DnsResolver.cs (1)
50_servers = new IPEndPoint[servers.Count];
System\Net\DnsResolverPal.Managed.cs (5)
826if (servers.Count > 0) 831for (int i = 0; i < servers.Count; i++) 847IPEndPoint[] copy = new IPEndPoint[servers.Count]; 852IPEndPoint[] resolved = new IPEndPoint[servers.Count]; 853for (int i = 0; i < servers.Count; i++)
System.Net.Quic (2)
System\Net\Quic\Internal\MsQuicBuffers.cs (2)
70Reserve(inputs.Count); 71for (int i = 0; i < inputs.Count; ++i)
System.Net.Security (1)
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (1)
151return c != null ? c.Count : 1;
System.Net.Sockets (9)
System\Net\Sockets\Socket.cs (2)
1146if (buffers.Count == 0) 1640if (buffers.Count == 0)
System\Net\Sockets\Socket.Tasks.cs (1)
817if (buffers.Count == 0)
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
166int bufferCount = value.Count;
System\Net\Sockets\SocketPal.Unix.cs (5)
292int maxBuffers = checked(buffers.Count - startIndex); 354for (; endIndex < buffers.Count && unconsumed > 0; endIndex++, endOffset = 0) 384int maxBuffers = buffers.Count; 545int buffersCount = buffers.Count; 1016(buffers != null && bufferIndex == buffers.Count);
System.ObjectModel (1)
System\Collections\Generic\DebugView.cs (1)
24T[] items = new T[_collection.Count];
System.Private.CoreLib (63)
Internal\Reflection\Extensions\NonPortable\CustomAttributeInstantiator.cs (3)
48if (parameters.Length != constructorArguments.Count) 145Array array = Array.CreateInstanceFromArrayType(argumentType, typedElements.Count); 146for (int i = 0; i < typedElements.Count; i++)
src\runtime\src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
37int count = ic.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (2)
288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count), 2713var keyValuePairs = new KeyValuePair<TKey, TValue>[_dictionary.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (1)
94int count = c.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (2)
88this(dictionary?.Count ?? 0, comparer) 101this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (8)
105int count = coll.Count; 842if (otherAsCollection.Count == 0) 947if (Count > otherAsCollection.Count) 983if (otherAsCollection.Count <= Count) 1028if (otherAsCollection.Count == 0) 1072if (otherAsCollection.Count == 0) 1149return otherAsCollection.Count == 0; 1168if (Count > otherAsCollection.Count)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (1)
24T[] items = new T[_collection.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (3)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count]; 48TKey[] items = new TKey[_collection.Count]; 69TValue[] items = new TValue[_collection.Count];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (3)
68int count = c.Count; 252int count = c.Count; 823int count = c.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (6)
32public int Count => items.Count; 46if ((uint)index >= (uint)items.Count) 62int index = items.Count; 103if ((uint)index > (uint)items.Count) 131if ((uint)index >= (uint)items.Count) 226int count = items.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
42ValidateCopyToArguments(collection.Count, array, index);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (3)
33public int Count => list.Count; 48list.Count == 0 ? SZGenericArrayEnumerator<T>.Empty : 157int count = list.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
71public int Count => m_dictionary.Count; 278public int Count => _collection.Count; 331public int Count => _collection.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (2)
34public int Count => _set.Count; 38_set.Count == 0 ? ((IEnumerable<T>)[]).GetEnumerator() :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
3331if ((flags & EventManifestOptions.Strict) != 0 && (manifest?.Errors.Count > 0 || exception != null)) 3335if (manifest?.Errors.Count > 0) 3379Debug.Assert(data.ConstructorArguments.Count <= 1); 3381if (data.ConstructorArguments.Count == 1) 3385else if (data.ConstructorArguments.Count == 0)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
87for (int i = 0; i < Keys.Count; i++)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeData.cs (2)
58int constructorArgumentsCount = constructorArguments.Count; 67int namedArgumentsCount = namedArguments.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
66int count = array.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (3)
46attribute.ConstructorArguments.Count == 1) 309attribute.ConstructorArguments.Count == 1) 401attribute.ConstructorArguments.Count == 1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
6116count = taskCollection.Count; 6430int count = taskCollection.Count; 6916int count = tasksAsCollection.Count;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (2)
2318int numTasks = tasks.Count; 2346int numTasks = tasks.Count;
System\Reflection\Runtime\Assemblies\RuntimeAssemblyInfo.cs (2)
275Assembly[] results = new Assembly[bindResults.Count]; 276for (int i = 0; i < bindResults.Count; i++)
System\Reflection\Runtime\CustomAttributes\RuntimeCustomAttributeData.cs (4)
45for (int i = 0; i < constructorArguments.Count; i++) 52for (int i = 0; i < namedArguments.Count; i++) 132string result = string.Format(@"new {0}[{1}] {{ ", elementType.IsEnum ? elementType.FullName : elementType.Name, array.Count); 134for (int i = 0; i < array.Count; i++)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (1)
779Debug.Assert(attribute.ConstructorArguments.Count == 1 && attribute.ConstructorArguments[0].Value is string);
System.Private.DataContractSerialization (21)
System\Runtime\Serialization\DataContract.cs (1)
1923if (nestedParameterCounts.Count > 1 || !genericNameProvider.ParametersFromBuiltInNamespaces)
System\Runtime\Serialization\DataContractSet.cs (3)
493genericParameters = new object[genInfo.Parameters.Count]; 494DataContract[] structureCheckContracts = new DataContract[genInfo.Parameters.Count]; 495for (int i = 0; i < genInfo.Parameters.Count; i++)
System\Runtime\Serialization\ExtensionDataReader.cs (6)
538if (dataNode.Members != null && _element.childElementIndex < dataNode.Members.Count) 541_context.IncrementItemCount(-dataNode.Members.Count); 557if (dataNode.Items != null && _element.childElementIndex < dataNode.Items.Count) 560_context.IncrementItemCount(-dataNode.Items.Count); 576if (dataNode.Members != null && _element.childElementIndex < dataNode.Members.Count) 579_context.IncrementItemCount(-dataNode.Members.Count);
System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
195for (int i = 0; i < knownTypeList.Count; i++)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (5)
843else if (dataNode.Size != dataNode.Items.Count) 844throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArraySizeAttributeIncorrect, arraySize, dataNode.Items.Count)); 850dataNode.Size = dataNode.Items.Count; 1055for (int i = 0; i < xmlAttributes.Count; i++) 1062for (int i = 0; i < xmlChildNodes.Count; i++)
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (5)
427IncrementCollectionCount(xmlWriter, collection.Count); 665for (int i = 0; i < members.Count; i++) 763for (int i = 0; i < members.Count; i++) 784for (int i = 0; i < items.Count; i++) 808for (int i = 0; i < members.Count; i++)
System.Private.Xml (119)
System\Xml\Schema\XdrValidator.cs (1)
304for (int i = 0; i < context.ElementDecl.DefaultAttDefs!.Count; ++i)
System\Xml\Schema\XmlSchemaValidator.cs (1)
1022for (int i = 0; i < currentElementDecl.DefaultAttDefs!.Count; ++i)
System\Xml\Schema\XsdValidator.cs (1)
537for (int i = 0; i < context.ElementDecl.DefaultAttDefs!.Count; ++i)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
309for (int i = 0; i < list.Count; i++)
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
54_namespaces = new Dictionary<string, XmlQualifiedName>(namespaces.Count);
System\Xml\XPath\Internal\FunctionQuery.cs (5)
25Query[] tmp = new Query[other._args.Count]; 49XPathResultType[] argTypes = new XPathResultType[_args.Count]; 50for (int i = 0; i < _args.Count; i++) 71object[] argVals = new object[_args.Count]; 72for (int i = 0; i < _args.Count; i++)
System\Xml\XPath\Internal\StringFunctions.cs (13)
29Query[] tmp = new Query[other._argList.Count]; 41for (int i = 0; i < _argList.Count; i++) 75if (_argList.Count > 0) 122while (count < _argList.Count) 131Debug.Assert(_argList.Count > 1); 139Debug.Assert(_argList.Count > 1); 147Debug.Assert(_argList.Count > 1); 157Debug.Assert(_argList.Count > 1); 167Debug.Assert(_argList.Count > 0); 175if (_argList.Count == 3) 208if (_argList.Count > 0) 219if (_argList.Count > 0) 257Debug.Assert(_argList.Count > 2);
System\Xml\Xsl\IlGen\StaticDataManager.cs (2)
114prefixMappings = new StringPair[list.Count]; 115for (int i = 0; i < list.Count; i++)
System\Xml\Xsl\ListBase.cs (2)
247if (_index > _sequence.Count) 259if (_index < _sequence.Count)
System\Xml\Xsl\QIL\QilNode.cs (1)
162for (int i = 0; i < list.Count; i++)
System\Xml\Xsl\QIL\QilPatternFactory.cs (1)
461switch (args.Count)
System\Xml\Xsl\QIL\QilXmlWriter.cs (1)
203if (fdecls != null && fdecls.Count > 0)
System\Xml\Xsl\Runtime\DodSequenceMerge.cs (3)
41if (sequence.Count == 0) 54_nodeCount = _firstSequence.Count; 58_nodeCount += sequence.Count;
System\Xml\Xsl\Runtime\WhitespaceRuleLookup.cs (1)
41for (int i = rules.Count - 1; i >= 0; i--)
System\Xml\Xsl\Runtime\XmlILStorageConverter.cs (2)
103XmlQueryNodeSequence seq = new XmlQueryNodeSequence(listItems.Count); 104for (int i = 0; i < listItems.Count; i++)
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (8)
79wsRules = (data.WhitespaceRules != null && data.WhitespaceRules.Count != 0) ? new WhitespaceRuleLookup(data.WhitespaceRules) : null; 510XPathNavigator[] navArray = new XPathNavigator[seq.Count]; 512for (int i = 0; i < seq.Count; i++) 530if (seq.Count == 1) 705XmlQueryCardinality card = seq.Count switch 716for (int i = 0; i < seq.Count; i++) 738if (seq.Count != 1) 860if (seq.Count <= 1)
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (2)
545public XmlQueryNodeSequence(IList<XPathNavigator> list) : base(list.Count) 547for (int idx = 0; idx < list.Count; idx++)
System\Xml\Xsl\Runtime\XmlQueryStaticData.cs (1)
209dataWriter.Write(_whitespaceRules.Count);
System\Xml\Xsl\Runtime\XslNumber.cs (3)
186if (val.Count == 1 && val[0].ValueType == typeof(double)) 201for (int idx = 0; idx < val.Count; idx++) 233int valCount = val.Count;
System\Xml\Xsl\Runtime\XsltConvert.cs (6)
58if (listItems.Count == 0) 102if (listItems.Count == 0) 138if (listItems.Count == 1) 158if (listItems.Count == 1) 189if (listItems.Count == 0) 327if (listItems.Count == 1)
System\Xml\Xsl\Runtime\XsltFunctions.cs (2)
270if (value.Count != 1) 315if (value.Count == 0)
System\Xml\Xsl\Runtime\XsltLibrary.cs (8)
92string[] arr = new string[args.Count]; 403return CompareNumbers(op, (nodeset.Count != 0) ? 1 : 0, XsltConvert.ToBoolean(val) ? 1 : 0); 407int length = nodeset.Count; 421int leftLen = left.Count; 422int rightLen = right.Count; 560if (val.Count == 1) 568int count = val.Count; 587if (val.Count == 1)
System\Xml\Xsl\XPath\XPathBuilder.cs (12)
575case FuncId.LocalName: return args.Count == 0 ? _f.LocalNameOf(GetCurrentNode()) : LocalNameOfFirstNode(args[0]); 576case FuncId.NamespaceUri: return args.Count == 0 ? _f.NamespaceUriOf(GetCurrentNode()) : NamespaceOfFirstNode(args[0]); 577case FuncId.Name: return args.Count == 0 ? NameOf(GetCurrentNode()) : NameOfFirstNode(args[0]); 578case FuncId.String: return args.Count == 0 ? _f.XPathNodeValue(GetCurrentNode()) : _f.ConvertToString(args[0]); 579case FuncId.Number: return args.Count == 0 ? _f.XsltConvert(_f.XPathNodeValue(GetCurrentNode()), T.DoubleX) : _f.ConvertToNumber(args[0]); 590return args.Count == 2 ? _f.InvokeSubstring(args[0], args[1]) : _f.InvokeSubstring(args[0], args[1], args[2]); 592return _f.XsltConvert(_f.StrLength(args.Count == 0 ? _f.XPathNodeValue(GetCurrentNode()) : args[0]), T.DoubleX); 594return _f.InvokeNormalizeSpace(args.Count == 0 ? _f.XPathNodeValue(GetCurrentNode()) : args[0]); 1033CheckArity(this.minArgs, this.maxArgs, name, args.Count); 1039for (int i = 0; i < args.Count; i++) 1046Debug.Assert(args.Count == 0 || argTypes != null); 1047for (int i = 0; i < args.Count; i++)
System\Xml\Xsl\Xslt\QilGenerator.cs (12)
516for (int i = 0; i < tmpl.Content.Count; i++) 705for (int i = from; i < instructions.Count; i++) 771i = instructions.Count; 1178for (int i = 0; i < content.Count; i++) 1264if (content.Count > 0) 1418for (int i = cases.Count - 1; 0 <= i; i--) 1489else if (content.Count != 0) 1529while (i < content.Count) 2534if (args.Count <= pos || args[pos].Name != name) 2572if (actualArgs.Count != formalArgs.Count) 2583for (int actArg = 0; actArg < actualArgs.Count; actArg++) 2664for (int i = 0; i < actualArgs!.Count; i++)
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (19)
126case FuncId.Document: return CompileFnDocument(args[0], args.Count > 1 ? args[1] : null); 127case FuncId.FormatNumber: return CompileFormatNumber(args[0], args[1], args.Count > 2 ? args[2] : null); 129case FuncId.GenerateId: return CompileGenerateId(args.Count > 0 ? args[0] : env.GetCurrent()!); 151FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 156FunctionInfo.CheckArity(/*minArg:*/2, /*maxArg:*/4, name, args.Count); 160/*lang: */2 < args.Count ? _f.ConvertToString(args[2]) : _f.String(string.Empty), 161/*options:*/3 < args.Count ? _f.ConvertToString(args[3]) : _f.String(string.Empty) 166FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 171FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/3, name, args.Count); 174/*format: */1 < args.Count ? _f.ConvertToString(args[1]) : _f.String(string.Empty), 175/*lang: */2 < args.Count ? _f.ConvertToString(args[2]) : _f.String(string.Empty), 181FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 186FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 191FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 200FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 205FunctionInfo.CheckArity(/*minArg:*/1, /*maxArg:*/1, name, args.Count); 213for (int i = 0; i < args.Count; i++) 219XmlExtensionFunction? scrFunc = _compiler.Scripts.ResolveFunction(name, ns, args.Count, (IErrorHelper)this); 243for (int i = 0; i < args.Count; i++)
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (2)
298args.Count == 1 && args[0].NodeType == QilNodeType.LiteralString, 307args.Count == 2 &&
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (8)
424VarPar?[] typeDonors = new VarPar[node.Content.Count]; 703if (node.Content.Count != 0) 720else if (node.Content.Count != 0) 1080if (args.Count == 0 && ( 1101else if (funcId == QilGenerator.FuncId.GenerateId && args.Count == 0) 1140XmlExtensionFunction? scrFunc = _compiler.Scripts.ResolveFunction(name, ns, args.Count, default(NullErrorHelper)); 1354int last = content.Count - 1; 1480Debug.Assert(parent.Content.Count == split + 1);
System.Private.Xml.Linq (1)
src\runtime\src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
37int count = ic.Count;
System.Reflection.Context (3)
System\Reflection\Context\Projection\Projector.cs (3)
15if (values == null || values.Count == 0) 126Debug.Assert(values != null && values.Count > 0); 128var projected = new T[values.Count];
System.Reflection.MetadataLoadContext (9)
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (3)
31int count = cats.Count; 45int count = cans.Count; 65int count = cats.Count;
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (2)
108int count = catgs.Count; 139int count = cangs.Count;
System\Reflection\TypeLoading\General\Ecma\EcmaDefaultValueProcessing.cs (2)
94if (cats.Count != 1) 110if (cats.Count != 5)
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
135if (ctas.Count != 1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
302if (fixedArguments.Count == 1 && fixedArguments[0].Value is string memberName)
System.Runtime.Caching (2)
System\Runtime\Caching\HostFileChangeMonitor.cs (2)
164if (filePaths.Count == 0) 177List<string> newList = new List<string>(filePaths.Count);
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (1)
140Debug.Assert(elementNames != null && elementNames.Count > 0);
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (1)
25_recipientInfos = new RecipientInfo[recipientInfos.Count];
System.ServiceModel.Federation.Tests (1)
WSTrustChannelSecurityTokenProviderTest.cs (1)
73Assert.Equal(2, trustRequest.AdditionalXmlElements.Count);
System.ServiceModel.Primitives (43)
System\IdentityModel\Claims\DefaultClaimSet.cs (3)
47get { return _claims.Count; } 62for (int i = 0; i < _claims.Count; ++i) 77for (int i = 0; i < _claims.Count; ++i)
System\IdentityModel\Claims\X509CertificateClaimSet.cs (2)
69return _claims.Count; 306for (int i = 0; i < _claims.Count; ++i)
System\IdentityModel\SecurityUtils.cs (4)
138if (authorizationPolicies != null && authorizationPolicies.Count == 1 && authorizationPolicies[0] is UnconditionalPolicy) 143else if (authorizationPolicies == null || authorizationPolicies.Count <= 0) 151object[] policyState = new object[authorizationPolicies.Count]; 159for (int i = 0; i < authorizationPolicies.Count; i++)
System\IdentityModel\Tokens\WSSecurityJan2004.cs (3)
199for (int i = 0; i < StrEntries.Count; ++i) 224for (int i = 0; i < StrEntries.Count; ++i) 236for (int i = 0; i < StrEntries.Count; ++i)
System\IdentityModel\Tokens\WSSecurityXXX2005.cs (1)
54for (int i = 0; i < StrEntries.Count; ++i)
System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
27for (int i = 0; i < collection.Count; i++)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
379for (int i = 0; i < newStrings.Count; i++) 409for (int i = 0; i < newStrings.Count; i++)
System\ServiceModel\Channels\CloseCollectionAsyncResult.cs (2)
25_count = collection.Count; 32for (int index = 0; index < collection.Count; index++)
System\ServiceModel\Channels\OpenCollectionAsyncResult.cs (2)
26_count = collection.Count; 33for (int index = 0; index < collection.Count; index++)
System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
125for (int i = 0; i < faultInfos.Count; i++)
System\ServiceModel\Dispatcher\XmlSerializerFaultFormatter.cs (1)
87for (int i = 0; i < faultInfos.Count; i++)
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
598object[] messageHeaderOfTArray = (object[])Array.CreateInstance(TypedHeaderManager.GetMessageHeaderType(headerDescription.Type), messageHeaderOfTAttributes.Count);
System\ServiceModel\EmptyArray.cs (2)
26if (collection.Count == 0) 32T[] array = new T[collection.Count];
System\ServiceModel\Security\ReceiveSecurityHeader.cs (7)
368for (int i = 0; i < _outOfBandPrimaryTokenCollection.Count; ++i) 404if (_supportingTokenAuthenticators != null && _supportingTokenAuthenticators.Count > 0) 406_supportingTokenTrackers = new List<TokenTracker>(_supportingTokenAuthenticators.Count); 407for (int i = 0; i < _supportingTokenAuthenticators.Count; ++i) 584for (int i = 0; i < _supportingTokenAuthenticators.Count; ++i) 615for (int i = 0; i < _outOfBandPrimaryTokenCollection.Count; ++i) 775for (int i = 0; i < allowedTokenAuthenticators.Count; ++i)
System\ServiceModel\Security\SecurityProtocol.cs (9)
264if (scopedProviders == null || scopedProviders.Count == 0) 331if (ChannelSupportingTokenProviderSpecification.Count == 0) 422if (tokens == null || tokens.Count == 0) 427for (int i = 0; i < tokens.Count; ++i) 507if (supportingTokenProviders != null && supportingTokenProviders.Count > 0) 510for (int i = 0; i < supportingTokenProviders.Count; ++i) 528if (supportingAuthenticators != null && supportingAuthenticators.Count > 0) 530for (int i = 0; i < supportingAuthenticators.Count; ++i) 561for (int i = 0; i < supportingTokens.Count; ++i)
System\ServiceModel\ServiceSecurityContext.cs (1)
82if (identities != null && identities.Count == 1)
System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
75get { lock (_sync) { return Items.Count; } }
System.ServiceModel.Syndication (3)
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (2)
36for (int i = 0; i < source.Items.Count; ++i) 152for (int i = 0; i < Items.Count; ++i)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
93for (int i = 0; i < srcList.Count; ++i)
System.Text.Json (21)
src\runtime\src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
122int count = children.Count;
System\ReflectionExtensions.cs (1)
565attribute.ConstructorArguments.Count > 0 &&
System\Text\Json\Nodes\JsonObject.cs (1)
38int capacity = properties is ICollection<KeyValuePair<string, JsonNode?>> propertiesCollection ? propertiesCollection.Count : 0;
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
88if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) 362if (typeInfo.UnionCases is { Count: > 0 } unionCases) 365List<JsonSchema>? unionAnyOf = new(unionCases.Count);
System\Text\Json\Serialization\Converters\FSharp\FSharpMapConverter.cs (1)
48int mapCount = ((ICollection<KeyValuePair<TKey, TValue>>)map).Count;
System\Text\Json\Serialization\JsonSerializerContext.cs (1)
61options.Converters.Count == 0 &&
System\Text\Json\Serialization\JsonUnionTypeStructuralClassifier.cs (1)
256List<PocoPropertyClassifierInfo> properties = new(typeInfo.Properties.Count);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (6)
110(inferClosedTypePolymorphism && options is null or { DerivedTypes.Count: 0 })) 125options is null or { DerivedTypes.Count: 0 } && 144options is { DerivedTypes.Count: 0 } && 178(typeInfo.TypeClassifierFactory is not null || typeInfo.Options.TypeClassifiers.Count > 0)) 205for (int i = 0; i < derivedTypes.Count; i++) 311Type[] derivedTypes = new Type[derivedTypeArguments.Count];
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
100Debug.Assert(typeInfo.UnionCases.Count == 0,
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
141if (typeClassifierFactory is not null || typeInfo.Options.TypeClassifiers.Count > 0)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (3)
1032UnionCases.Count > 0) 1047if (UnionCases.Count == 0) 1096Debug.Assert(UnionCases.Count > 0);
System\Text\Json\Serialization\ReadStackFrame.cs (1)
149AssignedProperties = new BitArray(typeInfo.Properties.Count);
System.Text.Json.SourceGeneration (1)
src\runtime\src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
122int count = children.Count;
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\CollectionDebuggerProxy.cs (1)
24var items = new T[_collection.Count];
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Sample.cs (1)
183static T Choose<T>(Random random, IList<T> elems) => elems[random.Next(elems.Count)];
System.Threading.Tasks.Dataflow (3)
Blocks\TransformManyBlock.cs (2)
372UpdateBoundingCountWithOutputCount(count: itemAsTrustedList.Count); 440if (_target.IsBounded) UpdateBoundingCountWithOutputCount(count: ((ICollection<TOutput>)outputItems).Count);
Blocks\WriteOnceBlock.cs (1)
176if (exceptions != null && exceptions.Count > 0)
System.Threading.Tasks.Parallel (5)
System\Threading\Tasks\Parallel.cs (5)
17630, list.Count, parallelOptions, (i) => body(list[i]), null, null, null, null); 17680, list.Count, parallelOptions, null, (i, state) => bodyWithState(list[i], state), null, null, null); 17730, list.Count, parallelOptions, null, (i, state) => bodyWithStateAndIndex(list[i], state, i), null, null, null); 17780, list.Count, parallelOptions, null, null, (i, state, local) => bodyWithStateAndLocal(list[i], state, local), localInit, localFinally); 17830, list.Count, parallelOptions, null, null, (i, state, local) => bodyWithEverything!(list[i], state, i, local), localInit, localFinally);
System.Windows.Forms (2)
misc\CollectionHelper.cs (1)
24if (target.Length - index < source.Count)
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
511Index = properties.Count,
System.Windows.Forms.Design (5)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (2)
588defaultPropList ??= new(data.Members.Count); 628defaultPropList ??= new(data.Members.Count);
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
20for (int i = snapLines.Count - 1; i >= 0; i--)
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
201for (int i = 0; i < snapLines.Count; i++)
System\Windows\Forms\Design\LabelDesigner.cs (1)
75for (int i = 0; i < snapLines.Count; i++)
System.Windows.Forms.Primitives (1)
System\Windows\Forms\FileDialogCustomPlacesCollection.cs (1)
12for (int i = Items.Count - 1; i >= 0; --i)
System.Xaml (43)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1304_count = collection.Count; 1990int count = collection.Count;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (4)
254for (int j = 0; j < list.Count; j++) 287for (int j = 0; j < list.Count && !attributeDataFound; j++) 331if (constructorArguments.Count == 1 && !noArgs) 350else if (constructorArguments.Count == 0)
System\Xaml\Context\XamlContext.cs (1)
385XamlType[] typeArgArray = new XamlType[typeArguments.Count];
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1249int paramTypesCount = paramTypes.Count;
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
440string[] keys = new string[dict.Count];
System\Xaml\Schema\Reflector.cs (6)
444if (cad.ConstructorArguments.Count == 1) 459if (cad.ConstructorArguments.Count != count) 494if (cad.ConstructorArguments.Count == 0) 499if (cad.ConstructorArguments.Count > 1 || 519for (int i = 0; i < _attributeData.Count; i++) 533for (int i = 0; i < _attributeData.Count; i++)
System\Xaml\Schema\XamlTypeInvoker.cs (1)
150(_xamlType.AllowedContentTypes.Count == 1 && contentType.CanAssignTo(_xamlType.ItemType)))
System\Xaml\Schema\XamlTypeTypeConverter.cs (2)
104typeArgs = new XamlType[typeName.TypeArguments.Count]; 105for (int i = 0; i < typeName.TypeArguments.Count; i++)
System\Xaml\XamlMember.cs (1)
213if (namespaces.Count > 0)
System\Xaml\XamlObjectReader.cs (5)
727for (int i = 0; i < itemsList.Count; i++) 765bool isLastElementOfCollection = (i == (itemsList.Count - 1)); 1095if (property.XamlNode.Member.DependsOn.Count > 0) 1180if (types is null || types.Count == 0) 1685if (constructorArguments.Count == properties.Count)
System\Xaml\XamlSchemaContext.cs (7)
290typeArgs = new XamlType[xamlTypeName.TypeArguments.Count]; 291for (int i = 0; i < xamlTypeName.TypeArguments.Count; i++) 785if (friends.Count == 0) 834for (int i = _unexaminedAssemblies.Count - 1; i >= 0; i--) 1124for (int i = 0; i < unexaminedAssembliesCopy.Count; i++) 1152for (int j = i; j < unexaminedAssembliesCopy.Count; j++) 1189for (int i = 0; i < xmlnsDefs.Count; i++)
System\Xaml\XamlType.cs (12)
135if (namespaces.Count > 0) 728List<XamlType> result = new List<XamlType>(contentWrappers.Count + 1); 1472for (int i = 0; i < TypeArguments.Count; i++) 1475if (i < TypeArguments.Count - 1) 1568if (list.Count > 0) 1578if (typeArguments is null || typeArguments.Count == 0) 1663List<XamlMember> result = new List<XamlMember>(excludedMembers.Count); 1664for (int i = 0; i < excludedMembers.Count; i++) 1850if (_typeArguments is not null && _typeArguments.Count > 0) 1941if (xamlType1._typeArguments.Count != xamlType2._typeArguments.Count) 1946for (int i = 0; i < xamlType1._typeArguments.Count; i++)
vbc (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (3)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i) 375writer.Write(Properties.Count);
VBCSCompiler (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (3)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i) 375writer.Write(Properties.Count);
vstest.console (4)
CommandLine\InferHelper.cs (2)
29if (sources == null || sources.Count == 0) 137if (sources == null || sources.Count == 0)
Internal\ConsoleLogger.cs (1)
690var runLevelAttachmentsCount = e.AttachmentSets == null ? 0 : e.AttachmentSets.Sum(attachmentSet => attachmentSet.Attachments.Count);
TestPlatformHelpers\TestRequestManager.cs (1)
797else if (sources.Count > 0)
vstest.console.arm64 (4)
src\vstest\src\vstest.console\CommandLine\InferHelper.cs (2)
29if (sources == null || sources.Count == 0) 137if (sources == null || sources.Count == 0)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
690var runLevelAttachmentsCount = e.AttachmentSets == null ? 0 : e.AttachmentSets.Sum(attachmentSet => attachmentSet.Attachments.Count);
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (1)
797else if (sources.Count > 0)