793 implementations of Count
Analyzer.Utilities.UnitTests (1)
Extensions\IEnumerableExensionsTests.cs (1)
135public int Count { get; }
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.Hosting (2)
ApplicationModel\ResourceCollection.cs (1)
20public 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\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
297public int Count => _innerHeaders.Count;
Http3\Http3ConnectionTests.cs (1)
861public int Count => _innerHeaders.Count;
Metrics (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Metrics.Legacy (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.AspNetCore.Components (1)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
312public int Count => _count;
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
2420public int Count => _inner.Count;
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
104int ICollection<KeyValuePair<object, object?>>.Count
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1386public 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\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
144public 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.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
55public int Count => _inner.Count;
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
773public int Count
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\CopyOnWriteList.cs (1)
43public int Count => Readable.Count;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
Microsoft.AspNetCore.Mvc.IntegrationTests (8)
ActionParametersIntegrationTest.cs (1)
1014public int Count
CollectionModelBinderIntegrationTest.cs (4)
1236int ICollection<string>.Count 1305int ICollection<string>.Count 1376int ICollection<T>.Count 1445int ICollection<T>.Count
DictionaryModelBinderIntegrationTest.cs (2)
1533int ICollection<KeyValuePair<string, string>>.Count 1638int ICollection<KeyValuePair<TKey, TValue>>.Count
TryUpdateModelIntegrationTest.cs (1)
1305public 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\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
Microsoft.AspNetCore.Server.HttpSys (3)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
103public int Count
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
115public int Count
UrlPrefixCollection.cs (1)
32public int Count
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
103public int Count
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.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1202public int Count => _innerHeaders.Count;
Microsoft.AspNetCore.Shared.Tests (5)
ClosedGenericMatcherTest.cs (1)
251int ICollection<KeyValuePair<string, object>>.Count
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
71public int Count
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
144public int Count => _dictionaryStorage != null ? _dictionaryStorage.Count : _count;
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
103public int Count
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
115public 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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.Analyzers (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.AnalyzerUtilities (26)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
67public int Count
Microsoft.CodeAnalysis.BannedApiAnalyzers (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.CodeStyle (24)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.Collections.Package (23)
Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.Extensions.Package (23)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.InteractiveHost (23)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.PublicApiAnalyzers (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
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.Threading.Package (23)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.UnitTests (1)
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (1)
156public int Count => int.MaxValue;
Microsoft.CodeAnalysis.Workspaces (24)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (24)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
Microsoft.Extensions.AI (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.AI.Abstractions (5)
AdditionalPropertiesDictionary{TValue}.cs (1)
77public int Count => _dictionary.Count;
Embeddings\GeneratedEmbeddings.cs (1)
56public int Count => _embeddings.Count;
Functions\AIFunctionArguments.cs (1)
117public int Count => _arguments.Count;
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.AI.AzureAIInference (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.AI.Ollama (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.AI.OpenAI (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
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)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Extensions.Primitives (1)
StringValues.cs (1)
91public int Count
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.Logging.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.Metrics.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (1)
24public int Count => 0;
Microsoft.Gen.MetricsReports.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
21public int Count => 0;
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;
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\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (1)
119public abstract int Count
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PartialList.cs (1)
113public int Count
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\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
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)
242public int Count => _count; 1481public int Count => _dictionary.Count; 1676public 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.Concurrent (1)
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1136public int Count
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (1)
366public 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)
140public 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)
70public int Count
System\Collections\Immutable\ImmutableList_1.cs (1)
142public int Count => _root.Count;
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
118public int Count
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
108public int Count
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (1)
76public int Count
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
115public int Count
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
53public int 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.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.DirectoryServices.AccountManagement (2)
artifacts\obj\System.DirectoryServices.AccountManagement\Debug\net10.0\System.DirectoryServices.AccountManagement.notsupported.cs (2)
229public int Count { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } } 356public int Count { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesAccountManagement_PlatformNotSupported); } }
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
724public int Count => Items.Length;
System.Linq (5)
System\Linq\Grouping.cs (1)
399int ICollection<TElement>.Count => _count;
System\Linq\Lookup.cs (1)
307public 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 (2)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (2)
307int System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>.Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } } 664public int Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
System.Net.HttpListener (1)
System\Net\HttpListenerPrefixCollection.cs (1)
70public int Count => _httpListener.PrefixCollection.Count;
System.Net.NetworkInformation (4)
artifacts\obj\System.Net.NetworkInformation\Debug\net10.0\System.Net.NetworkInformation.notsupported.cs (4)
25public virtual int Count { get { throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported); } } 146public virtual int Count { get { throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported); } } 371public virtual int Count { get { throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported); } } 610public virtual int Count { get { throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported); } }
System.Net.Primitives (2)
artifacts\obj\System.Net.Primitives\Debug\net10.0\System.Net.Primitives.notsupported.cs (2)
52public int Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetPrimitives); } } 409public virtual int Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetPrimitives); } }
System.Private.CoreLib (13)
src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs (1)
71public int Count => _count;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (3)
209public int Count => _count - _freeCount; 1926public int Count => _dictionary.Count; 2121public int Count => _dictionary.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
357public int Count => _count - _freeCount;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (1)
127public int Count => _size;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
32public int Count => items.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
33public int Count => list.Count;
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\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (1)
34public int Count => _set.Count;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
81public int Count => m_names.Length;
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)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (1)
46public int Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } }
System.ServiceModel.Primitives (2)
netstandard.cs (2)
20public int Count { get { return default; } } 1726public int Count { get { return default; } }
System.Speech (1)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (1)
301public int Count { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } }
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)
31public int Count => _capcount;
System\Text\RegularExpressions\GroupCollection.cs (1)
36public int Count => _match._matchcount.Length;
System\Text\RegularExpressions\MatchCollection.cs (1)
45public 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.Windows.Forms.Tests (1)
System\Windows\Forms\ListBindingHelperTests.cs (1)
579public int Count => throw new NotImplementedException();
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
System.Xaml.Tests (6)
System\Xaml\XamlTypeTests.cs (6)
1820public int CountCount => throw new NotImplementedException(); 3101int ICollection<object>.Count => throw new NotImplementedException(); 3103int ICollection<int>.Count => throw new NotImplementedException(); 3150int ICollection<KeyValuePair<string, int>>.Count => throw new NotImplementedException(); 3152int ICollection<KeyValuePair<int, string>>.Count => throw new NotImplementedException();
Test.Utilities (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
Text.Analyzers (25)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
58public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (1)
86public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (1)
33public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
28public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
58public readonly int Count => ReadOnlyDictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
24public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
82public int Count => _set.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
34public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
56public readonly int Count => ReadOnlySet.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
83public int Count => _list.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
26public int Count => _builder.Count;
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
35public readonly int Count => ReadOnlyList.Count;
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
126int ICollection<T>.Count => Length;
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (3)
230public int Count => _count - _freeCount; 1339public int Count => _dictionary.Count; 1547public int Count => _dictionary.Count;
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
358public int Count => _count - _freeCount;
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
181public int Count => _size;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Collection.cs (1)
43public int Count => 0;
src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
44public int Count
src\Dependencies\Collections\Specialized\SpecializedCollections.Singleton.Collection`1.cs (1)
46public int Count => 1;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
106public int Count
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
54public int Count => _dictionary.Count;
3704 references to Count
aspire (1)
Commands\ExecCommand.cs (1)
126if (commandTokens is null || commandTokens.Count == 0)
Aspire.Dashboard (5)
Components\Controls\Chart\ChartBase.cs (2)
229for (var i = dimensionValues.Count - 1; i >= 0; i--) 446for (var i = dimensionValues.Count - 1; i >= 0; i--)
Components\Controls\Chart\MetricTable.razor.cs (1)
65if (xValuesToAnnounce.Count == 0)
ServiceClient\DashboardClient.cs (2)
709var resourceLogLines = new ResourceLogLine[logLines.Count]; 711for (var i = 0; i < logLines.Count; i++)
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\MetricsTests.cs (1)
1249Assert.Equal(valueCount, scope.Values.Count);
Aspire.Hosting (1)
Orchestrator\ParameterProcessor.cs (1)
126while (unresolvedParameters.Count > 0)
Aspire.Hosting.Azure (2)
AzureProvisioningResource.cs (1)
88Debug.Assert(compilation.Count == 1);
AzurePublishingContext.cs (1)
72if (model.Resources.Count == 0)
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
53if (model.Resources.Count == 0)
Aspire.Hosting.Kubernetes (1)
KubernetesPublishingContext.cs (1)
57if (model.Resources.Count == 0)
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (1)
111Debug.Assert(exData is not null && exData.Count == 4);
BasicWebSite (2)
ActionDescriptorCreationCounter.cs (1)
36if (context.Results.Count == 0)
Controllers\TempDataController.cs (1)
77return $"{value1} {value2} {value3.Count} {value4} {value5}";
CodeGenerator (2)
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
403var useVarForFirstTerm = values.Count > 1 && values.Select(h => h.FirstNameIgnoreCaseSegment()).Distinct().Count() == 1; 1476if (values.Count == 1 && values[0].Field.Value.Length == 0)
csc (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
dotnet-dev-certs (1)
Program.cs (1)
305if (certificates.Count == 0)
dotnet-razorpagegenerator (1)
Program.cs (1)
48Console.WriteLine($"{results.Count} files successfully generated.");
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-svcutil-lib (79)
CodeDomFixup\ConfigToCode.cs (3)
169if (toRemoves.Count > 0) 295if (toRemoves.Count > 0) 421if (toRemoves.Count > 0)
CommandProcessorOptions.cs (1)
861Dictionary<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)
803LockFileTarget 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-user-jwts (3)
Commands\ClearCommand.cs (1)
49var count = jwtStore.Jwts.Count;
Commands\ListCommand.cs (2)
55if (jwtStore.Jwts is { Count: > 0 } jwts) 70if (jwtStore.Jwts is { Count: > 0 } jwts)
dotnet-user-secrets (2)
Internal\SecretsStore.cs (1)
48public int Count => _secrets.Count;
Internal\SetCommand.cs (1)
81context.Reporter.Output(Resources.FormatMessage_Saved_Secrets(provider.CurrentData.Count));
GenerateDocumentationAndConfigFiles (52)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
HostFilteringSample (1)
Startup.cs (1)
28if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
Identity.ExternalClaims (1)
Pages\Account\Manage\ExternalLogins.cshtml.cs (1)
50ShowRemoveButton = user.PasswordHash != null || CurrentLogins.Count > 1;
IdentitySample.Mvc (1)
Controllers\ManageController.cs (1)
309ViewData["ShowRemoveButton"] = user.PasswordHash != null || userLogins.Count > 1;
illink (5)
InMemory.FunctionalTests (4)
Http2\Http2ConnectionTests.cs (3)
297public int Count => _innerHeaders.Count; 3644Assert.Equal(4, settings.Count); 3701Assert.Equal(5, settings.Count);
Http3\Http3ConnectionTests.cs (1)
861public int Count => _innerHeaders.Count;
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
1352Logger.LogInformation($"Server trailer count: {feature.Trailers.Count}");
Metrics (47)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Metrics.Legacy (47)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.Analyzers.Extra.Tests (1)
UsingToStringInLoggersTests.cs (1)
72Assert.Equal(3, d.Count);
Microsoft.Analyzers.Local (1)
ApiLifecycle\Json\JsonObject.cs (1)
33public int Count => _properties.Count;
Microsoft.Analyzers.Local.Tests (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Arcade.Test.Common (2)
DiffUtil.cs (2)
54foreach (var edit in GetEdits(sequenceA, sequenceA.Count, sequenceB, sequenceB.Count).Reverse())
Microsoft.AspNetCore (5)
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 (2)
414if (_builtApplication.DataSources.Count > 0) 458if (_builtApplication.DataSources.Count > 0)
WebHost.cs (1)
256if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
Microsoft.AspNetCore.AsyncState (1)
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)
132writer.Write(claim.Properties.Count);
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationSchemeProvider.cs (1)
214if (_schemes.Count == 1)
Microsoft.AspNetCore.Authentication.Core.Test (1)
AuthenticationPropertiesTests.cs (1)
95Assert.Equal(2, props.Items.Count);
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
47if (Options.Fields.Count > 0)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
693if (properties == null || properties.Items.Count == 0)
Microsoft.AspNetCore.Authentication.Test (15)
FacebookTests.cs (1)
457Assert.Equal(2, transaction.SetCookie.Count);
GoogleTests.cs (8)
567Assert.Equal(2, transaction.SetCookie.Count); 730Assert.Equal(2, transaction.SetCookie.Count); 770Assert.Equal(2, transaction.SetCookie.Count); 891Assert.Equal(2, transaction.SetCookie.Count); 935Assert.Equal(2, transaction.SetCookie.Count); 979Assert.Equal(2, transaction.SetCookie.Count); 1016Assert.Equal(2, transaction.SetCookie.Count); 1090Assert.Equal(2, transaction.SetCookie.Count);
MicrosoftAccountTests.cs (2)
252Assert.Equal(2, transaction.SetCookie.Count); 357Assert.Equal(2, transaction.SetCookie.Count);
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
456Assert.Equal(2, challengeCookies.Count);
OpenIdConnect\OpenIdConnectTests.cs (1)
541Assert.Equal(2, options.Scope.Count);
OpenIdConnect\TestTransaction.cs (1)
25if (SetCookie != null && SetCookie.Count > 0)
Transaction.cs (1)
23if (SetCookie != null && SetCookie.Count > 0)
Microsoft.AspNetCore.Authorization (1)
AuthorizationPolicy.cs (1)
127skipEnumeratingData = dataList.Count == 0;
Microsoft.AspNetCore.Authorization.Test (4)
AuthorizationEndpointConventionBuilderExtensionsTests.cs (4)
136Assert.Equal(2, endpointModel.Metadata.Count); 159Assert.Equal(2, endpointModel.Metadata.Count); 187Assert.Equal(2, endpointModel.Metadata.Count); 213Assert.Equal(2, endpointModel.Metadata.Count);
Microsoft.AspNetCore.Components (5)
ParameterView.cs (1)
305var builder = new ParameterViewBuilder(parameters.Count);
Routing\RouteTableFactory.cs (2)
203seen.EnsureCapacity(builder.InboundEntries.Count); 205for (var i = 0; i < builder.InboundEntries.Count; i++)
src\Http\Routing\src\RouteConstraintMatcher.cs (1)
56if (constraints == null || constraints.Count == 0)
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Components.Endpoints (5)
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++)
Rendering\EndpointHtmlRenderer.cs (1)
273var result = new List<StringValues>(form.Keys.Count);
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (2)
1247Assert.Equal(expected.Count, dictionary.Count);
WebRootComponentParametersTest.cs (1)
176for (var i = 0; i < parameterValues.Count; i++)
Microsoft.AspNetCore.Components.QuickGrid (1)
QuickGrid.razor.cs (1)
328_ariaBodyRowCount = _currentNonVirtualizedViewItems.Count;
Microsoft.AspNetCore.Components.Server (10)
Builder\ServerRazorComponentsEndpointConventionBuilderExtensions.cs (1)
50for (var i = 0; i < b.Metadata.Count; i++)
Circuits\ComponentParameterDeserializer.cs (5)
27if (parameterValues.Count != parametersDefinitions.Count) 30Log.MismatchedParameterAndDefinitions(_logger, parametersDefinitions.Count, parameterValues.Count); 34for (var i = 0; i < parametersDefinitions.Count; i++)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
79for (var i = 0; i < c.Metadata.Count; i++)
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.Tests (2)
Circuits\CircuitHostTest.cs (1)
802for (var i = 0; i < parameterValues.Count; i++)
Circuits\RemoteRendererTest.cs (1)
690for (var i = 0; i < parameterValues.Count; i++)
Microsoft.AspNetCore.Components.Tests (8)
CascadingParameterTest.cs (4)
167Assert.Equal(3, firstBatch.DiffsByComponentId.Count); // Root + CascadingValue + nested 176Assert.Equal(2, secondBatch.DiffsByComponentId.Count); // Root + CascadingValue, but not nested one 229Assert.Equal(3, secondBatch.DiffsByComponentId.Count); // Root + CascadingValue + CascadingValue, but not nested component 295Assert.Equal(2, secondBatch.DiffsByComponentId.Count); // Root + CascadingValue, but not nested one
RendererTest.cs (3)
80Assert.Equal(2, batch.DiffsByComponentId.Count); 2981Assert.Equal(4, batch.DiffsInOrder.Count); 3435Assert.Equal(2, batch2.DiffsInOrder.Count); // Parent and first child
RouteViewTest.cs (1)
92Assert.Equal(4, batch.DiffsInOrder.Count);
Microsoft.AspNetCore.Components.Web (1)
Virtualization\Virtualize.cs (1)
454Items!.Count));
Microsoft.AspNetCore.Components.WebAssembly (6)
.packages\microsoft.dotnet.hotreload.agent\10.0.100-preview.7.25358.102\contentFiles\cs\net6.0\MetadataUpdateHandlerInvoker.cs (1)
167if (ctorArgs.Count != 1 ||
Prerendering\WebAssemblyComponentParameterDeserializer.cs (5)
28if (parameterValues.Count != parametersDefinitions.Count) 31throw new InvalidOperationException($"The number of parameter definitions '{parametersDefinitions.Count}' does not match the number parameter values '{parameterValues.Count}'."); 34for (var i = 0; i < parametersDefinitions.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.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\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.CookiePolicy.Test (4)
CookieConsentTests.cs (2)
218Assert.Equal(2, cookies.Count); 399Assert.Equal(2, cookies.Count);
CookiePolicyTests.cs (1)
450Assert.Equal(3, transaction.SetCookie.Count);
Transaction.cs (1)
24if (SetCookie != null && SetCookie.Count > 0)
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.DeveloperCertificates.XPlat.Tests (1)
CertificateManagerTests.cs (1)
501Assert.Equal(2, httpsCertificateList.Count);
Microsoft.AspNetCore.Diagnostics (2)
DeveloperExceptionPage\Views\CompilationErrorPage.Designer.cs (1)
334for (var i = 0; i < Model.ErrorDetails.Count; i++)
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.Tests (3)
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\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
111for (var i = fields.Count - 1; i >= 0; i--)
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
111for (var i = fields.Count - 1; i >= 0; i--)
Microsoft.AspNetCore.Grpc.Swagger.Tests (14)
Binding\ParametersTests.cs (8)
29Assert.Equal(2, operation.Parameters.Count); 45Assert.Equal(2, operation.Parameters.Count); 61Assert.Equal(3, operation.Parameters.Count); 87Assert.Equal(4, swagger.Components.Schemas["RequestTwo"].Properties.Count); 99Assert.Equal(4, operation.Parameters.Count); 129Assert.Equal(5, operation.Parameters.Count); 151Assert.Equal(3, operation.Parameters.Count); 179Assert.Equal(2, operation.Parameters.Count);
Binding\ResponseBodyTests.cs (1)
65Assert.Equal(5, enumSchema.Enum.Count);
SchemaGeneratorIntegrationTests.cs (5)
45Assert.Equal(5, enumSchema.Enum.Count); 65Assert.Equal(5, schema.Enum.Count); 85Assert.Equal(2, schema.Properties.Count); 115Assert.Equal(2, schema.Properties.Count); 175Assert.Equal(4, schema.Properties.Count);
Microsoft.AspNetCore.HeaderParsing (1)
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.HostFiltering.Tests (1)
MiddlewareConfigurationManagerTests.cs (1)
88Assert.True(options.AllowedHosts.All(x => result1.AllowedHosts.Contains(x)) && options.AllowedHosts.Count.Equals(result1.AllowedHosts.Count));
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostService.cs (1)
68if (addresses != null && !addresses.IsReadOnly && addresses.Count == 0)
Internal\WebHost.cs (1)
263if (addresses != null && !addresses.IsReadOnly && addresses.Count == 0)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
253for (var i = 0; i < attributes.Count; i++)
Microsoft.AspNetCore.Hosting.Tests (1)
StartupManagerTests.cs (1)
757public int MethodsCalled => _configurationMethodCalledList.Count;
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\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
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\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
CookieBuilderTests.cs (2)
62Assert.Equal(2, options.Extensions.Count); 69Assert.Equal(2, cookie.Extensions.Count);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
726var 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)
99var transportCount = response.AvailableTransports.Count; 117var formatCount = availableTransport.TransferFormats.Count;
Microsoft.AspNetCore.Http.Connections.Tests (10)
HttpConnectionDispatcherTests.cs (1)
819Assert.Equal(3, connectionHttpContext.Request.Headers.Count);
MapConnectionHandlerTests.cs (7)
40options => authCount += options.AuthorizationData.Count, 78options => authCount += options.AuthorizationData.Count)) 105options => authCount += options.AuthorizationData.Count)) 133options => authCount += options.AuthorizationData.Count)) 162authCount += options.AuthorizationData.Count; 192authCount += options.AuthorizationData.Count; 221authCount += options.AuthorizationData.Count;
NegotiateProtocolTests.cs (1)
35Assert.Equal(availableTransports?.Length, response.AvailableTransports?.Count);
WebSocketsTests.cs (1)
415Assert.Equal(2, messages.Received.Count);
Microsoft.AspNetCore.Http.Extensions (18)
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 (4)
351if (factoryContext.EndpointBuilder.FilterFactories.Count > 0) 415Debug.Assert(factoryContext.EndpointBuilder.FilterFactories.Count > 0); 487for (var i = factoryContext.EndpointBuilder.FilterFactories.Count - 1; i >= 0; i--) 990if (factoryContext.EndpointBuilder.FilterFactories.Count > 0)
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.Extensions.Tests (10)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
234Assert.Equal(3, jsonOptions.Value.SerializerOptions.TypeInfoResolverChain.Count);
RequestDelegateFactoryTests.cs (5)
3399var currentMetadataCount = builder.Metadata.Count; 3410var currentMetadataCount = builder.Metadata.Count; 3421for (int i = builder.Metadata.Count - 1; i >= 0; i--) 3439for (int i = builder.Metadata.Count - 1; i >= 0; i--) 3457for (int i = builder.Metadata.Count - 1; i >= 0; i--)
RequestDelegateGenerator\SharedTypes.cs (4)
646for (int i = builder.Metadata.Count - 1; i >= 0; i--) 664for (int i = builder.Metadata.Count - 1; i >= 0; i--) 927var currentMetadataCount = builder.Metadata.Count; 960var currentMetadataCount = builder.Metadata.Count;
Microsoft.AspNetCore.Http.Microbenchmarks (4)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (4)
646for (int i = builder.Metadata.Count - 1; i >= 0; i--) 664for (int i = builder.Metadata.Count - 1; i >= 0; i--) 927var currentMetadataCount = builder.Metadata.Count; 960var currentMetadataCount = builder.Metadata.Count;
Microsoft.AspNetCore.Http.Results (3)
src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
268if (etagHeader?.Count > 0)
Microsoft.AspNetCore.Http.Tests (2)
CookieOptionsTests.cs (2)
57Assert.Equal(original.Extensions.Count, copy.Extensions.Count);
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.KnownNetworks.Count > 0 || _options.KnownProxies.Count > 0;
Microsoft.AspNetCore.HttpsPolicy (1)
HstsMiddleware.cs (1)
84for (var i = 0; i < _excludedHosts.Count; i++)
Microsoft.AspNetCore.Identity (2)
DefaultPasskeyHandler.cs (1)
102if (_passkeyOptions.AllowedOrigins.Count > 0)
SignInManager.cs (1)
1370(await UserManager.GetValidTwoFactorProvidersAsync(user)).Count > 0;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (21)
SqlStoreOnlyUsersTestBase.cs (8)
169Assert.Equal(2, (await manager.GetClaimsAsync(userById)).Count); 171Assert.Equal(2, (await manager.GetRolesAsync(userById)).Count); 184Assert.Equal(2, (await manager.GetClaimsAsync(userByName)).Count); 186Assert.Equal(2, (await manager.GetRolesAsync(userByName)).Count); 199Assert.Equal(2, (await manager.GetClaimsAsync(userByLogin)).Count); 201Assert.Equal(2, (await manager.GetRolesAsync(userByLogin)).Count); 215Assert.Equal(2, (await manager.GetClaimsAsync(userByEmail)).Count); 217Assert.Equal(2, (await manager.GetRolesAsync(userByEmail)).Count);
SqlStoreTestBase.cs (8)
275Assert.Equal(2, (await manager.GetClaimsAsync(userById)).Count); 277Assert.Equal(2, (await manager.GetRolesAsync(userById)).Count); 290Assert.Equal(2, (await manager.GetClaimsAsync(userByName)).Count); 292Assert.Equal(2, (await manager.GetRolesAsync(userByName)).Count); 305Assert.Equal(2, (await manager.GetClaimsAsync(userByLogin)).Count); 307Assert.Equal(2, (await manager.GetRolesAsync(userByLogin)).Count); 332Assert.Equal(2, (await manager.GetClaimsAsync(userByEmail)).Count); 334Assert.Equal(2, (await manager.GetRolesAsync(userByEmail)).Count);
UserStoreWithGenericsTest.cs (5)
110Assert.Equal(3, userClaims.Count); 115Assert.Equal(2, userClaims.Count); 139Assert.Equal(3, userClaims.Count); 142Assert.Equal(2, userClaims.Count); 150Assert.Equal(3, userClaims2.Count);
Microsoft.AspNetCore.Identity.FunctionalTests (6)
Infrastructure\ServerFactory.cs (1)
127for (var i = 0; i < manager.ApplicationParts.Count; i++)
LoginTests.cs (3)
251Assert.Equal(2, emailSender.SentEmails.Count); 351Assert.Equal(2, emailSender.SentEmails.Count); 381Assert.Equal(2, emailSender.SentEmails.Count);
ManagementTests.cs (2)
75Assert.Equal(2, emails.SentEmails.Count); 102Assert.Equal(2, emails.SentEmails.Count);
Microsoft.AspNetCore.Identity.Specification.Tests (21)
IdentitySpecificationTestBase.cs (8)
247Assert.Equal(3, roleClaims.Count); 248Assert.Equal(3, safeRoleClaims.Count); 252Assert.Equal(2, roleClaims.Count); 253Assert.Equal(3, safeRoleClaims.Count); 258Assert.Equal(3, safeRoleClaims.Count); 263Assert.Equal(3, safeRoleClaims.Count); 409Assert.Equal(roles.Count, rs.Count); 592Assert.Equal(3, (await manager.GetUsersInRoleAsync(await roleManager.GetRoleNameAsync(role))).Count);
UserManagerSpecificationTests.cs (13)
716Assert.Equal(3, userClaims.Count); 719Assert.Equal(2, userClaims.Count); 747Assert.Equal(3, userClaims.Count); 750Assert.Equal(2, userClaims.Count); 758Assert.Equal(3, userClaims2.Count); 775Claim oldClaim = userClaims.Count == 0 ? null : userClaims[0]; 779Claim newClaim = newUserClaims.Count == 0 ? null : newUserClaims[0]; 803Claim oldClaim = userClaims.Count == 0 ? null : userClaims[0]; 807Claim newClaim = newUserClaims.Count == 0 ? null : newUserClaims[0]; 812Claim oldClaim2 = userClaims2.Count == 0 ? null : userClaims2[0]; 1825Assert.Equal(2, factors.Count); 1834Assert.Equal(2, factors.Count); 1931Assert.Equal(3, (await manager.GetUsersForClaimAsync(new Claim("foo", "bar"))).Count);
Microsoft.AspNetCore.Identity.UI (2)
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.JsonPatch.SystemTextJson.Tests (9)
IntegrationTests\DictionaryIntegrationTest.cs (7)
40Assert.Equal(3, model.DictionaryOfStringToInteger.Count); 96Assert.Equal(2, model.DictionaryOfStringToInteger.Count); 115Assert.Equal(2, model.DictionaryOfStringToInteger.Count); 195Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 264Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 288Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 312Assert.Equal(2, model.DictionaryOfStringToInteger.Count);
TestObjectModels\DynamicTestObject.cs (1)
19public int Count => ((IDictionary<string, object>)_dictionary).Count;
WriteOnceDynamicTestObject.cs (1)
33public int Count => ((IDictionary<string, object>)_dictionary).Count;
Microsoft.AspNetCore.JsonPatch.Tests (9)
IntegrationTests\DictionaryIntegrationTest.cs (7)
40Assert.Equal(3, model.DictionaryOfStringToInteger.Count); 96Assert.Equal(2, model.DictionaryOfStringToInteger.Count); 115Assert.Equal(2, model.DictionaryOfStringToInteger.Count); 195Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 264Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 288Assert.Equal(2, model.DictionaryOfStringToCustomer.Count); 312Assert.Equal(2, model.DictionaryOfStringToInteger.Count);
TestObjectModels\DynamicTestObject.cs (1)
19public int Count => ((IDictionary<string, object>)_dictionary).Count;
WriteOnceDynamicTestObject.cs (1)
33public int Count => ((IDictionary<string, object>)_dictionary).Count;
Microsoft.AspNetCore.Localization (1)
AcceptLanguageHeaderRequestCultureProvider.cs (1)
29if (acceptLanguageHeader == null || acceptLanguageHeader.Count == 0)
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (1)
MiddlewareAnalysisTests.cs (1)
49Assert.Equal(2, listener.MiddlewareStarting.Count);
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\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.Mvc.Api.Analyzers (6)
AddResponseTypeAttributeCodeFixAction.cs (1)
59if (results.Count == 0)
ApiConventionAnalyzer.cs (2)
81for (var i = 0; i < declaredResponseMetadata.Count; i++) 97for (var i = 0; i < actualResponseMetadata.Count; i++)
DeclaredApiResponseMetadata.cs (1)
66for (var i = 0; i < declaredApiResponseMetadata.Count; i++)
SymbolApiResponseMetadataProvider.cs (2)
25if (metadataItems.Count != 0) 33if (metadataItems.Count == 0)
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (1)
285if (apiResponse.ApiResponseFormats.Count > 0)
DefaultApiDescriptionProvider.cs (4)
126if (apiDescription.ParameterDescriptions.Count > 0) 214for (var i = context.Results.Count - 1; i >= 0; i--) 246for (var i = context.Results.Count - 1; i >= 0; i--) 377if (action.ActionConstraints != null && action.ActionConstraints.Count > 0)
EndpointMetadataApiDescriptionProvider.cs (1)
373else if (apiResponseType.ApiResponseFormats.Count == 0 && CreateDefaultApiResponseFormat(apiResponseType.Type) is { } defaultResponseFormat)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (37)
DefaultApiDescriptionProviderTest.cs (17)
729Assert.Equal(4, description.SupportedResponseTypes.Count); 839Assert.Equal(3, description.SupportedResponseTypes.Count); 902Assert.Equal(4, description.SupportedResponseTypes.Count); 972Assert.Equal(4, description.SupportedResponseTypes.Count); 1042Assert.Equal(4, description.SupportedResponseTypes.Count); 1354Assert.Equal(3, parameters.Count); 1452Assert.Equal(3, parameters.Count); 1554Assert.Equal(3, parameters.Count); 1581Assert.Equal(4, description.ParameterDescriptions.Count); 1745Assert.Equal(2, description.ParameterDescriptions.Count); 1769Assert.Equal(4, description.ParameterDescriptions.Count); 1800Assert.Equal(4, description.ParameterDescriptions.Count); 1832Assert.Equal(4, description.ParameterDescriptions.Count); 1863Assert.Equal(4, description.ParameterDescriptions.Count); 1891Assert.Equal(8, description.ParameterDescriptions.Count); 1980Assert.Equal(2, parameters.Count); 2025Assert.Equal(5, description.ParameterDescriptions.Count);
EndpointMetadataApiDescriptionProviderTest.cs (20)
34Assert.Equal(2, apiDescriptions.Count); 91Assert.Equal(2, apiDescription.SupportedRequestFormats.Count); 110Assert.Equal(2, apiDescription.SupportedRequestFormats.Count); 125Assert.Equal(2, apiDescription.SupportedRequestFormats.Count); 192Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 219Assert.Equal(3, apiDescription.SupportedResponseTypes.Count); 257Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 283Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 314Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 447Assert.Equal(3, apiDescription.SupportedResponseTypes.Count); 498Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 577Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 611Assert.Equal(2, apiDescription.SupportedResponseTypes.Count); 836Assert.Equal(3, apiDescription.ParameterDescriptions.Count); 916Assert.Equal(4, apiDescription.ParameterDescriptions.Count); 929Assert.Equal(4, apiDescription.ParameterDescriptions.Count); 946Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 958Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 1003Assert.Equal(2, apiDescription.ParameterDescriptions.Count); 1490Assert.Equal(2, apiDescription.SupportedRequestFormats.Count);
Microsoft.AspNetCore.Mvc.Core (89)
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++) 213for (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 (8)
67if (SupportedEncodings.Count == 0) 87for (var i = 0; i < SupportedEncodings.Count; i++) 111if (SupportedEncodings.Count > 0) 194if (acceptCharsetHeaders != null && acceptCharsetHeaders.Count > 0) 197for (var i = 0; i < acceptValues.Count; i++) 202for (var j = 0; j < SupportedEncodings.Count; j++) 224for (var i = 0; i < values.Count; i++) 243for (var i = 0; i < values.Count; i++)
Infrastructure\ControllerActionInvoker.cs (2)
517if (actionDescriptor.BoundProperties.Count == 0 && 518actionDescriptor.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\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
268if (etagHeader?.Count > 0)
Microsoft.AspNetCore.Mvc.Core.Test (40)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (13)
66Assert.Equal(3, descriptor.FilterDescriptors.Count); 371Assert.Equal(3, descriptorWithValue.RouteValues.Count); 388Assert.Equal(2, descriptorWithoutValue.RouteValues.Count); 903Assert.Equal(3, indexAction.RouteValues.Count); 1192Assert.Equal(2, action.ActionConstraints.Count); 1198Assert.Equal(2, action.ActionConstraints.Count); 1217Assert.Equal(3, action.ActionConstraints.Count); 1223Assert.Equal(3, action.ActionConstraints.Count); 1244Assert.Equal(3, action.ActionConstraints.Count); 1250Assert.Equal(3, action.ActionConstraints.Count); 1256Assert.Equal(3, action.ActionConstraints.Count); 1262Assert.Equal(3, action.ActionConstraints.Count); 1283Assert.Equal(2, action.ActionConstraints.Count);
ApplicationModels\DefaultApplicationModelProviderTest.cs (13)
443Assert.Equal(2, attributeRoutes.Count); 465Assert.Equal(2, attributeRoutes.Count); 958Assert.Equal(2, action.Selectors.Count); 1035Assert.Equal(2, action.Selectors.Count); 1084Assert.Equal(2, actions.Selectors.Count); 1108Assert.Equal(3, action.Selectors.Count); 1135Assert.Equal(2, action.Selectors.Count); 1159Assert.Equal(2, action.Selectors.Count); 1185Assert.Equal(2, actionModel.Selectors.Count); 1190Assert.Equal(2, selectorModel.ActionConstraints.Count); 1197Assert.Equal(2, selectorModel.ActionConstraints.Count); 1215Assert.Equal(2, actions.Selectors.Count); 1237Assert.Equal(2, action.Selectors.Count);
ApplicationModels\EndpointMetadataProviderTest.cs (4)
441for (int i = builder.Metadata.Count - 1; i >= 0; i--) 460for (int i = builder.Metadata.Count - 1; i >= 0; i--) 480for (int i = builder.Metadata.Count - 1; i >= 0; i--) 498for (int i = builder.Metadata.Count - 1; i >= 0; i--)
Formatters\InputFormatterTest.cs (1)
446return SupportedTypes.Count == 0 ? true : SupportedTypes.Contains(type);
Formatters\TextInputFormatterTest.cs (1)
218return SupportedTypes.Count == 0 ? true : SupportedTypes.Contains(type);
Infrastructure\ControllerActionInvokerTest.cs (1)
223Assert.Equal(2, controllerContext.ValueProviderFactories.Count);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
1252var lastIndex = options.Value.ModelBinderProviders.Count - 1;
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
47Assert.Equal(2, dictionary.Count);
ModelBinding\Binders\FormFileModelBinderTest.cs (1)
244Assert.Equal(2, files.Count);
ModelBinding\Validation\ClientValidatorCacheTest.cs (1)
126for (var i = 0; i < context.Results.Count; i++)
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (2)
92Assert.Equal(2, validatorItems.Count); 137Assert.Equal(2, validatorItems.Count);
ModelBinding\Validation\ValidatorCacheTest.cs (1)
78for (var i = 0; i < context.Results.Count; i++)
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.DataAnnotations.Test (5)
DataAnnotationsModelValidatorProviderTest.cs (1)
54Assert.Equal(4, providerContext.Results.Count);
DefaultModelClientValidatorProviderTest.cs (4)
94Assert.Equal(2, validatorItems.Count); 118Assert.Equal(2, validatorItems.Count); 162Assert.Equal(2, validatorItems.Count); 185Assert.Equal(2, validatorItems.Count);
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
ValidationProblemDetailsWrapper.cs (1)
82if (ProblemDetails.Errors.Count == 0)
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
ApiExplorerTest.cs (2)
858Assert.Equal(4, responseType.ResponseFormats.Count); 884Assert.Equal(2, responseType.ResponseFormats.Count);
BasicTests.cs (2)
486Assert.True(assemblyParts.Count > 2); 488for (var i = 1; i < assemblyParts.Count; i++)
Microsoft.AspNetCore.Mvc.IntegrationTests (5)
ActionParametersIntegrationTest.cs (1)
1016get { return _original.Count; }
DictionaryModelBinderIntegrationTest.cs (2)
1537return _data.Count; 1642return _data.Count;
ExcludeBindingMetadataProviderIntegrationTest.cs (1)
74for (var i = options.ModelMetadataDetailsProviders.Count - 1; i >= 0; i--)
TryUpdateModelIntegrationTest.cs (1)
1307get { return _original.Count; }
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)
54var referencePaths = new List<string>(_options.AdditionalReferencePaths.Count);
RuntimeCompilationFileProvider.cs (2)
37if (fileProviders.Count == 0) 45else if (fileProviders.Count == 1)
RuntimeViewCompiler.cs (2)
64precompiledViews.Count, 139for (var i = 0; i < item.ExpirationTokens.Count; i++)
Microsoft.AspNetCore.Mvc.Razor.Test (24)
RazorPageTest.cs (24)
288Assert.Equal(2, bufferScope.CreatedBuffers.Count); 300Assert.Equal(2, bufferScope.CreatedBuffers.Count); 303Assert.Equal(2, bufferScope.CreatedBuffers.Count); 307Assert.Equal(2, bufferScope.CreatedBuffers.Count); 310Assert.Equal(2, bufferScope.CreatedBuffers.Count); 317Assert.Equal(2, bufferScope.CreatedBuffers.Count); 320Assert.Equal(3, bufferScope.CreatedBuffers.Count); 333Assert.Equal(3, bufferScope.CreatedBuffers.Count); 336Assert.Equal(4, bufferScope.CreatedBuffers.Count); 348Assert.Equal(4, bufferScope.CreatedBuffers.Count); 351Assert.Equal(4, bufferScope.CreatedBuffers.Count); 352Assert.Equal(2, bufferScope.ReturnedBuffers.Count); 355Assert.Equal(4, bufferScope.CreatedBuffers.Count); 356Assert.Equal(2, bufferScope.ReturnedBuffers.Count); 358Assert.Equal(4, bufferScope.CreatedBuffers.Count); 359Assert.Equal(2, bufferScope.ReturnedBuffers.Count); 364Assert.Equal(4, bufferScope.CreatedBuffers.Count); 365Assert.Equal(2, bufferScope.ReturnedBuffers.Count); 367Assert.Equal(4, bufferScope.CreatedBuffers.Count); 368Assert.Equal(3, bufferScope.ReturnedBuffers.Count); 371Assert.Equal(4, bufferScope.CreatedBuffers.Count); 372Assert.Equal(3, bufferScope.ReturnedBuffers.Count); 374Assert.Equal(4, bufferScope.CreatedBuffers.Count); 375Assert.Equal(3, bufferScope.ReturnedBuffers.Count);
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)
182if (_actionDescriptor.BoundProperties.Count == 0 && (_handler == null || _handler.Parameters.Count == 0)) 204for (var i = 0; i < _actionDescriptor.HandlerMethods.Count; i++) 222if (handler.Parameters.Count == 0) 227var arguments = new object?[handler.Parameters.Count]; 258for (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.RazorPages.Test (3)
ApplicationModels\CompiledPageRouteModelProviderTest.cs (1)
481for (var i = 0; i < items.Count; i++)
Infrastructure\PageActionInvokerTest.cs (2)
111Assert.Equal(2, pageContext.ValueProviderFactories.Count); 1531handlers = new PageHandlerExecutorDelegate[actionDescriptor.HandlerMethods.Count];
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.TagHelpers.Test (1)
OptionTagHelperTest.cs (1)
358entry => (entry[1] != null || entry[3] == null || ((ICollection<string>)(entry[3])).Count == 0));
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (2)
315Assert.Equal(2, manager.ApplicationParts.Count); 343Assert.Equal(2, manager.ApplicationParts.Count);
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
320if (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.Mvc.ViewFeatures.Test (5)
AttributeDictionaryTest.cs (2)
199Assert.Equal(3, keys.Count); 351Assert.Equal(3, values.Count);
Buffers\PagedBufferedTextWriterTest.cs (1)
260Assert.Equal(3, pool.Returned.Count);
CookieTempDataProviderTest.cs (1)
324if (responseCookies.Count > 0)
ExpressionHelperTest.cs (1)
120(Expression<Func<IList<TestModel>, int>>)(model => model.FirstOrDefault().PreferredCategories.Count),
Microsoft.AspNetCore.OpenApi (13)
Services\OpenApiDocumentService.cs (4)
222server?.Features.Get<IServerAddressesFeature>()?.Addresses is { Count: > 0 } addresses) 368if (description.SupportedResponseTypes.Count == 0) 530if (supportedRequestFormats.Count == 0) 692if (supportedRequestFormats.Count == 0)
Services\Schemas\OpenApiSchemaService.cs (9)
161if (schema.AnyOf is { Count: > 0 }) 163for (var i = 0; i < schema.AnyOf.Count; i++) 178if (schema.AllOf is { Count: > 0 }) 180for (var i = 0; i < schema.AllOf.Count; i++) 186if (schema.OneOf is { Count: > 0 }) 188for (var i = 0; i < schema.OneOf.Count; i++) 308if (schema.AnyOf is { Count: > 0 } && jsonTypeInfo.PolymorphismOptions is not null) 314if (schema.AnyOf.Count <= anyOfIndex) 329if (schema.Properties is { Count: > 0 })
Microsoft.AspNetCore.OpenApi.Tests (20)
Services\OpenApiGeneratorTests.cs (8)
108Assert.Equal(2, content.Count); 119Assert.Equal(2, request.Content.Count); 449Assert.Equal(2, operation.Parameters.Count); 509Assert.Equal(2, operation.Parameters.Count); 530Assert.Equal(2, operation.Parameters.Count); 815Assert.Equal(2, content.Count); 984Assert.Equal(4, operation.Parameters?.Count); 1004Assert.Equal(2, operation.Parameters.Count);
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
744Assert.Equal(3, property.Enum.Count);
Transformers\CustomSchemaTransformerTests.cs (3)
131Assert.Equal(4, todoSchema.Properties.Count); 221Assert.Equal(2, document.Components.Schemas.Count); 234Assert.Equal(4, operation.Parameters.Count);
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (7)
111Assert.Equal(4, effectiveSchema.Properties.Count); 268Assert.Equal(4, requestBodySchema.Items.Properties.Count); 360Assert.Equal(4, itemsSchema.Properties.Count); 476Assert.Equal(3, document.Components.Schemas.Count); 553Assert.Equal(2, document.Components.Schemas.Count); 673Assert.Equal(3, document.Components.Schemas.Count); 699Assert.Equal(2, requestSchema.Properties.Count);
Transformers\SchemaTransformerTests.cs (1)
710Assert.Equal(2, requestSchema.AllOf.Count);
Microsoft.AspNetCore.OutputCaching (4)
OutputCacheEntry.cs (1)
86var count = headers.Count;
OutputCacheKeyProvider.cs (1)
342if (dictionary == null || dictionary.Count == 0)
OutputCacheMiddleware.cs (1)
539for (var i = 0; i < ifNoneMatchETags?.Count; i++)
RecyclableReadOnlySequenceSegment.cs (1)
85int count = segments.Count;
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
EndToEndBenchmarks.cs (1)
217if (value.Headers.Length != _headers.Count - 2)
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.Owin.Tests (4)
OwinEnvironmentTests.cs (4)
144var length = collection.Count; 168var initialEnv1Count = env1.Count; 171Assert.Equal(initialEnv1Count, env1.Count + 1); 207Assert.True(owinEnvironment2.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\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
Microsoft.AspNetCore.RequestDecompression.Tests (1)
RequestDecompressionOptionsTests.cs (1)
19Assert.Equal(defaultProviderCount, providers.Count);
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
446for (var i = 0; i < ifNoneMatchEtags.Count; i++)
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionProvider.cs (1)
88if (!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.Rewrite.Tests (10)
ApacheModRewrite\TestStringParserTests.cs (3)
126Assert.Equal(p1.PatternSegments.Count, p2.PatternSegments.Count); 128for (int i = 0; i < p1.PatternSegments.Count; i++)
IISUrlRewrite\FileParserTests.cs (6)
144Assert.Equal(2, rules.Count); 199Assert.Equal(actual.Count, expected.Count); 200for (var i = 0; i < actual.Count; i++) 222Assert.Equal(c1.Input.PatternSegments.Count, c2.Input.PatternSegments.Count);
IISUrlRewrite\InputParserTests.cs (1)
33Assert.Equal(expected, result.PatternSegments.Count);
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) 117for (var j = 0; j < values.Count; j++) 404!StringWithQualityHeaderValue.TryParseList(header, out var values) || values.Count == 0) 415for (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) 66if (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.Routing.Tests (11)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
377Assert.Equal(2, endpointBuilder1.Metadata.Count);
Patterns\RoutePatternMatcherTest.cs (1)
1121Assert.Equal(expected.Count, values.Count);
RouteTest.cs (2)
1578Assert.Equal(expectedDictionary.Count, templateRoute.DataTokens.Count); 1642Assert.Equal(2, constraints.Count);
Template\TemplateMatcherTests.cs (1)
1120Assert.Equal(expected.Count, values.Count);
Template\TemplateParserTests.cs (6)
828if (x.Segments.Count != y.Segments.Count) 833for (var i = 0; i < x.Segments.Count; i++) 849if (x.Parameters.Count != y.Parameters.Count) 854for (var i = 0; i < x.Parameters.Count; i++)
Microsoft.AspNetCore.Server.HttpSys (8)
AuthenticationManager.cs (1)
183if (challenges.Count > 0)
HttpSysListener.cs (3)
312if (authChallenges != null && authChallenges.Count > 0) 327var nativeHeaderValues = allocator.AllocAsPointer<HTTP_KNOWN_HEADER>(authChallenges.Count); 330for (var headerValueIndex = 0; headerValueIndex < authChallenges.Count; headerValueIndex++)
MessagePump.cs (1)
69var hostingUrlsPresent = _serverAddresses.Addresses.Count > 0;
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
105get { return Store.Count; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
120count += _extra != null ? _extra.Count : _requestMemoryBlob.CountUnknownHeaders();
UrlPrefixCollection.cs (1)
38return _prefixes.Count;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (11)
RequestHeaderTests.cs (11)
44Assert.Equal(4, requestHeaders.Count); 187Assert.Equal(3, requestHeaders.Count); 188Assert.Equal(requestHeaders.Keys.Count, requestHeaders.Count); 189Assert.Equal(requestHeaders.Count, requestHeaders.Values.Count); 214Assert.Equal(4, requestHeaders.Count); 215Assert.Equal(requestHeaders.Keys.Count, requestHeaders.Count); 216Assert.Equal(requestHeaders.Count, requestHeaders.Values.Count);
Microsoft.AspNetCore.Server.HttpSys.Tests (10)
RequestHeaderTests.cs (10)
33Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 54Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 74Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 95Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 116Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 135Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 154Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 178Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 200Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count); 285Assert.Equal(requestHeaders.Count, requestHeaders.Keys.Count);
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
105get { return Store.Count; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
120count += _extra != null ? _extra.Count : _requestMemoryBlob.CountUnknownHeaders();
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)
384var cert = certs.Count > 0 ? certs[0] : null;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (15)
Http1\Http1ConnectionTests.cs (9)
882await WaitForCondition(TestConstants.DefaultTimeout, () => _http1Connection.RequestHeaders.Count >= header0Count); 883Assert.Equal(header0Count, _http1Connection.RequestHeaders.Count); 886await WaitForCondition(TestConstants.DefaultTimeout, () => _http1Connection.RequestHeaders.Count >= header0Count + header1Count); 887Assert.Equal(header0Count + header1Count, _http1Connection.RequestHeaders.Count); 918await WaitForCondition(TestConstants.DefaultTimeout, () => _http1Connection.RequestHeaders.Count >= header0Count); 920Assert.Equal(header0Count, _http1Connection.RequestHeaders.Count); 923await WaitForCondition(TestConstants.DefaultTimeout, () => _http1Connection.RequestHeaders.Count >= header0Count + header1Count); 925Assert.Equal(header0Count + header1Count, _http1Connection.RequestHeaders.Count); 1202public int Count => _innerHeaders.Count;
HttpRequestHeadersTests.cs (4)
63Assert.Equal(3, headers.Count); 316Assert.Equal(3, headers.Count); 338Assert.Equal(3, headers.Count); 346Assert.Equal(2, headers.Count);
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
403var useVarForFirstTerm = values.Count > 1 && values.Select(h => h.FirstNameIgnoreCaseSegment()).Distinct().Count() == 1; 1476if (values.Count == 1 && values[0].Field.Value.Length == 0)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
ConfigurationReaderTests.cs (1)
57Assert.Equal(2, certificates.Count);
Microsoft.AspNetCore.Shared.Tests (9)
CopyOnWriteDictionaryTest.cs (1)
21.SetupGet(d => d.Count)
PropertyHelperTest.cs (3)
682Assert.Equal(2, dictValues.Count); 698Assert.Equal(2, dictValues.Count); 714Assert.Equal(3, dictValues.Count);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
75return ReadDictionary.Count;
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
105get { return Store.Count; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
120count += _extra != null ? _extra.Count : _requestMemoryBlob.CountUnknownHeaders();
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
253for (var i = 0; i < attributes.Count; i++)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\Utf8BufferTextWriterTests.cs (1)
207Assert.Equal(6, segments.Count);
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionHandler.cs (1)
114if (supportedProtocols == null || supportedProtocols.Count == 0)
Internal\DefaultHubDispatcher.cs (1)
668if (descriptor.Policies.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.SignalR.Tests (9)
HubConnectionHandlerTests.cs (3)
2025Assert.Equal(5, messages.Count); 4433Assert.Equal(phrases.Length + 1, messages.Count); 4492Assert.Equal(2, messages.Count);
MapSignalRTests.cs (6)
79authCount += options.AuthorizationData.Count; 110authCount += options.AuthorizationData.Count; 151authCount += options.AuthorizationData.Count; 180authCount += options.AuthorizationData.Count; 209authCount += options.AuthorizationData.Count; 239authCount += options.AuthorizationData.Count;
Microsoft.AspNetCore.StaticAssets (4)
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\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.StaticFiles.FunctionalTests (2)
src\Shared\RangeHelper\RangeHelper.cs (2)
67Debug.Assert(rangeHeader.Ranges.Count == 1); 76if (ranges.Count == 0)
Microsoft.AspNetCore.Testing (2)
ServiceFakesHostExtensions.cs (1)
73if (feature is null || feature.Addresses.Count == 0)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2794Assert.Equal(3, debugView.Middleware.Count); 3114if (_urls.Count == 0)
Microsoft.AspNetCore.WebSockets (1)
WebSocketMiddleware.cs (1)
43_anyOriginAllowed = _options.AllowedOrigins.Count == 0 || _options.AllowedOrigins.Contains("*", StringComparer.Ordinal);
Microsoft.Build.Framework (12)
BinaryTranslator.cs (7)
1160int count = list.Count; 1185_writer.Write(collection.Count); 1403(dictionary is null ? 0 : dictionary.Count); 1448int count = dictionary.Count; 1471int count = dictionary.Count; 1526int count = dictionary.Count; 1555int count = dictionary.Count;
BuildException\BuildExceptionBase.cs (1)
104writer.Write(customKeyedSerializedData.Count);
ProjectStartedEventArgs.cs (1)
488writer.Write(collection.Count);
ReuseableStringBuilder.cs (1)
147var separatorsRemaining = strings.Count - 1;
TaskItemData.cs (1)
55public int MetadataCount => Metadata.Count;
TelemetryEventArgs.cs (1)
32int count = Properties?.Count ?? 0;
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TargetTests.cs (2)
832Assert.Equal(expectedItemCount, items.Count); 841Assert.Equal(expectedItemCount, items.Count);
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; 68return (uint)asIListT.Count;
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\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\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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Microsoft.CodeAnalysis.AnalyzerUtilities (49)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
2093=> dict1.Count == dict2.Count &&
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.BannedApiAnalyzers (52)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Microsoft.CodeAnalysis.CodeStyle (44)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
122return (missingCases: missingEnumMembers.Count > 0, missingDefaultCase: !HasDefaultCase(operation));
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
176if (documentsUpdated.Count != 1)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
186.Skip(reservedNames.Count)];
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
100if (commonTypes.Count == 0) 105if (commonTypes.Count == 0)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Microsoft.CodeAnalysis.Collections.Package (26)
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; 724return (list.Count == 1) ? list[0] : default;
Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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];
Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
Segmented\SegmentedDictionary`2.cs (2)
124: this(dictionary?.Count ?? 0, comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
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)
Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
Specialized\SpecializedCollections.cs (3)
97return collection == null || collection.Count == 0 104return set == null || set.Count == 0 111return set == null || set.Count == 0
Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Microsoft.CodeAnalysis.CSharp (13)
BoundTree\VariablePendingInference.cs (1)
96Debug.Assert(inferenceDiagnostics.DependenciesBag.Count == 0);
Compilation\CSharpCompilation.cs (1)
2737if (_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)
308if (directiveNodes.Count == 0) 313var directives = ArrayBuilder<ReferenceDirective>.GetInstance(directiveNodes.Count);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
391if (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)
1040if (diagnostics.DiagnosticBag?.IsEmptyWithoutResolution == false || diagnostics.DependenciesBag?.Count > 0)
Syntax\SyntaxFactory.cs (2)
1362if (collection != null && collection.Count == 0) 1381var builder = new SeparatedSyntaxListBuilder<TNode>(collection != null ? collection.Count : 3);
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
364if (result.GetTextChanges(cancellationToken).Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
62for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 71return xNameParts.Count - yNameParts.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
163for (var i = 0; i < list.Count - 1; i++) 176for (var i = 1; i < list.Count; i++)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
646if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\UnknownSourcePasteProcessor.cs (1)
239for (int changeIndex = 0, lastChangeIndex = Changes.Count; changeIndex < lastChangeIndex; changeIndex++)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
142if (workspace.Projects.Count == 2)
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (2)
64for (var i = 0; i < orderedCSharpArgumentProviders.Count; i++) 71else if (i == orderedCSharpArgumentProviders.Count - 1) // last one
Completion\CompletionProviders\CompletionProviderOrderTests.cs (2)
96for (var i = 0; i < orderedCSharpCompletionProviders.Count; i++) 103else if (i == orderedCSharpCompletionProviders.Count - 1) // last one
Debugging\ProximityExpressionsGetterTests.cs (1)
112Assert.True(actualTerms is null or { Count: > 0 });
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
106history.Undo(count: originalSelections.Count);
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
161Assert.Equal(6, list.Count); 349Assert.Equal(5, list.Count); 433Assert.Equal(2, list.Count);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenCapturing.cs (6)
75for (int varDepth = 0; varDepth < varsToCapture.Count; varDepth++) 88int numVarsAvailable = variablesByScope[varDepth].Count; 208Assert.Equal(expectedCtx.Count, ctx.VariablesByScope.Count); 209for (int depth = 0; depth < expectedCtx.Count; depth++) 252for (int depth = startingDepth; depth < layout.Count; depth++) 260newCurrent = (layout.Count, 0);
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.Symbol.UnitTests (1)
Compilation\GetSemanticInfoTests.cs (1)
2393for (int i = 0; i < exprs.Count; i++)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (51)
IncrementalParsing\IncrementalParsingTests.cs (4)
363Assert.Equal(4, oldDirectives.Count); 375Assert.Equal(3, newDirectives.Count); 408Assert.Equal(3, oldDirectives.Count); 417Assert.Equal(4, newDirectives.Count);
LexicalAndXml\PreprocessorTests.cs (3)
123Assert.Equal(expected.Length, directives.Count); 146Assert.Equal(expected.Length, directives.Count); 296Assert.Equal(1, directives.Count);
LexicalAndXml\RawStringLiteralLexingTests.cs (4)
185Assert.True(spans.Count == 0 || spans.Count == 1); 199if (spans.Count == 0) 217Assert.Equal(1, spans.Count);
Syntax\StructuredTriviaTests.cs (4)
110Assert.Equal(3, directives.Count); 124Assert.Equal(1, directives.Count); 135Assert.Equal(0, directives.Count); 148Assert.Equal(3, directives.Count);
Syntax\SyntaxDiffingTests.cs (28)
27Assert.Equal(1, spans.Count); 32Assert.Equal(1, changes.Count); 46Assert.Equal(1, spans.Count); 52Assert.Equal(1, changes.Count); 66Assert.Equal(2, spans.Count); 74Assert.Equal(2, changes.Count); 89Assert.Equal(1, spans.Count); 94Assert.Equal(1, changes.Count); 107Assert.Equal(1, spans.Count); 112Assert.Equal(1, changes.Count); 126Assert.Equal(1, spans.Count); 131Assert.Equal(1, changes.Count); 146Assert.Equal(1, spans.Count); 151Assert.Equal(1, changes.Count); 164Assert.Equal(1, spans.Count); 169Assert.Equal(1, changes.Count); 182Assert.Equal(1, spans.Count); 187Assert.Equal(1, changes.Count); 200Assert.Equal(0, spans.Count); 204Assert.Equal(1, changes.Count); 217Assert.Equal(0, spans.Count); 221Assert.Equal(1, changes.Count); 234Assert.Equal(0, spans.Count); 238Assert.Equal(1, changes.Count); 251Assert.Equal(1, spans.Count); 256Assert.Equal(1, changes.Count); 324Assert.Equal(1, changes.Count); 386Assert.Equal(1, changes.Count);
Syntax\SyntaxNodeTests.cs (8)
47Assert.Equal(2, directives.Count); 339Assert.Equal(directives.Count, descendantDirectives.Count); 340for (int i = 0; i < directives.Count; i++) 3657Assert.Equal(0, ChangesForDifferentTrees.Count); 3668Assert.Equal(2, ChangesFromTransform.Count); 3675Assert.Equal(2, changes2UsingCommonSyntax.Count); 3707Assert.Equal(0, ChangesForDifferentTrees.Count); 3740Assert.Equal(0, ChangesForDifferentTrees.Count);
Microsoft.CodeAnalysis.CSharp.Workspaces (18)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
364if (result.GetTextChanges(cancellationToken).Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
62for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 71return xNameParts.Count - yNameParts.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
163for (var i = 0; i < list.Count - 1; i++) 176for (var i = 1; i < list.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
646if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
Microsoft.CodeAnalysis.EditorFeatures (10)
Adornments\AbstractAdornmentManager.cs (1)
236if (viewLines == null || viewLines.Count == 0)
Editor\TextBufferAssociatedViewService.cs (1)
121if (views.Count == 0)
Formatting\FormatCommandHandler.cs (1)
170if (textChanges == null || textChanges.Count == 0)
Preview\SolutionPreviewResult.cs (1)
31public bool IsEmpty => _previews.Count == 0;
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (2)
92if (e.Changes.Count != 1 || ShouldClearTrackingSession(e.Changes.Single())) 264var index = _committedSessions.Count;
Shared\Extensions\IProjectionBufferFactoryServiceExtensions.cs (1)
323if (snapshotSpans.Count > 0)
Shared\Tagging\EventSources\TaggerEventSources.TextChangedEventSource.cs (1)
39if (e.Changes.Count == 0)
SignatureHelp\Model.cs (1)
48Contract.ThrowIfFalse(items.Count != 0, "Must have at least one item.");
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
95if (e.Changes.Count == 0)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
BracePairs\AbstractBracePairsTests.cs (1)
40Assert.Equal(expected.Count, bracePairs.Count);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
70for (var j = 0; j < Math.Max(highlightSpans.Count, expectedHighlightSpans.Count); j++) 72if (j >= expectedHighlightSpans.Count)
RefactoringHelpers\RefactoringHelpersTestBase.cs (2)
75if (spans.Count != 1 || 89if (spans.Count != 2 ||
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
184Assert.True(expectedTestItems.Count() == actualSignatureHelpItems.Items.Count, $"Expected {expectedTestItems.Count()} items, but got {actualSignatureHelpItems.Items.Count}");
TaskList\AbstractTaskListTests.cs (1)
43Assert.Equal(items.Length, expectedLists.Count);
Microsoft.CodeAnalysis.EditorFeatures.Text (5)
ITextImageHelpers.cs (5)
36if (oldVersion.Changes.Count != 0) 55var builder = new FixedSizeArrayBuilder<TextChangeRange>(changes.Count); 56for (var i = 0; i < changes.Count; i++) 89var changes = ArrayBuilder<TextChangeRange>.GetInstance(version.Changes.Count); 90for (var i = 0; i < version.Changes.Count; i++)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\AttributeHelpers.cs (3)
47if (arguments.Count == 0) 51else if (arguments.Count == 1) 75if (arguments.Count == 1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\AttributeHelpers.cs (3)
47if (arguments.Count == 0) 51else if (arguments.Count == 1) 75if (arguments.Count == 1)
Microsoft.CodeAnalysis.Extensions.Package (29)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
SignatureHelp\FSharpSignatureHelpItems.cs (2)
69Contract.ThrowIfTrue(selectedItem.HasValue && selectedItem.Value >= items.Count); 83if (selectedItem.HasValue && items.Count != distinctItems.Count)
Microsoft.CodeAnalysis.Features (25)
CodeFixes\Service\CodeFixService.cs (2)
934var builder = new FixedSizeArrayBuilder<IConfigurationFixProvider>(orderedLanguageKindAndFixers.Count); 952for (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)
344if (builder.Count == 0)
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
71var preselect = !args.self.IsInstrinsic(symbol) && args.inferredTypes.Count > 0 && args.inferredTypes.Contains(GetSymbolType(symbol));
Debugging\AbstractBreakpointResolver.cs (1)
127switch (nameParts.Count)
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (1)
245for (var i = 0; i < lines.Count; i++)
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
245if (finalFieldName != field.Name && constructorLocations.Count > 0)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
543public bool HasMultipleDocuments => _solutionId != null || _projectOrDocumentIds?.Count > 1;
ExtractMethod\MethodExtractor.Analyzer.cs (1)
249var variableMapStatus = failedVariables.Count == 0
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
252if (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)
36if (info.TypesParts.Count > 0)
RQName\SimpleTree\SimpleGroupNode.cs (1)
20public int Count { get { return Children.Count; } }
SignatureHelp\AbstractSignatureHelpProvider.cs (2)
43if (items is null || items.Count == 0 || state == null) 198if (info.TypesParts.Count > 0)
SignatureHelp\SignatureHelpItems.cs (2)
71Contract.ThrowIfTrue(selectedItem.HasValue && selectedItem.Value >= items.Count); 78if (selectedItem.HasValue && items.Count != distinctItems.Count)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
122return (missingCases: missingEnumMembers.Count > 0, missingDefaultCase: !HasDefaultCase(operation));
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
176if (documentsUpdated.Count != 1)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
186.Skip(reservedNames.Count)];
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
100if (commonTypes.Count == 0) 105if (commonTypes.Count == 0)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
48var expectedSortedResults = workspace.Documents.Where(d => d.SelectedSpans.Count > 0).Select(d => d.Id).OrderBy(d => d.Id);
Microsoft.CodeAnalysis.InteractiveHost (26)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Protocol\Extensions\Converters\VSExtensionUtilities.cs (1)
32var existingConvertersCount = converters.Count;
Protocol\Internal\Converters\VSInternalExtensionUtilities.cs (1)
31var existingConvertersCount = converters.Count;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (52)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Microsoft.CodeAnalysis.PublicApiAnalyzers (47)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.ResxSourceGenerator (47)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Microsoft.CodeAnalysis.Test.Utilities (8)
Assert\DiffUtil.cs (2)
57foreach (var edit in GetEdits(sequenceA, sequenceA.Count, sequenceB, sequenceB.Count).Reverse())
Syntax\TokenUtilities.cs (6)
23var max = Math.Min(expectedTokens.Count, actualTokens.Count); 53if (expectedTokens.Count != actualTokens.Count) 58expectedTokens.Count, actualTokens.Count, expectedDisplay, actualDisplay);
Microsoft.CodeAnalysis.Threading.Package (26)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Microsoft.CodeAnalysis.UnitTests (71)
Collections\HashSet\ISet_Generic_Tests`1.cs (12)
57while (set.Count < numberOfItemsToAdd) 97Assert.Equal(count + 1, set.Count); 117Assert.Equal(count + 1, collection.Count); 128if (set.Count == 0 || enumerable == set) 131Assert.Equal(0, set.Count); 139Assert.Equal(expected.Count, set.Count); 146if (set.Count == 0 || !Enumerable.Any(enumerable)) 149Assert.Equal(0, set.Count); 165Assert.Equal(expected.Count, set.Count); 290Assert.Equal(expected.Count, set.Count); 302Assert.Equal(expected.Count, set.Count); 661Assert.Equal(expected.Count, set.Count);
Collections\IdentifierCollectionTests.cs (2)
40Assert.Equal(strings.Length, idcol.Count); 57Assert.Equal(strings.Length, idcol.Count);
Collections\ImmutableDictionaryBuilderTestBase.cs (5)
47Assert.Equal(1, builder.Count); 92Assert.Equal(1, builder.Count); 102Assert.Equal(1, builder.Count); 245var array = new object[builder.Count + 1]; 250var entryArray = new DictionaryEntry[builder.Count + 1];
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (1)
300var array = new T[collection.Count + 1];
Collections\ImmutablesTestBase.cs (4)
46Assert.Equal(expected.Count, actual.Count); 147T[] manualArray = new T[expectedResults.Count]; 162Assert.Equal(expectedResults.Count, i); //, "Enumeration did not produce enough elements.");
Collections\List\CollectionAsserts.cs (2)
53Assert.Equal(expected.Count, actual!.Count);
Collections\List\ICollection.Generic.Tests.cs (22)
59while (collection.Count < numberOfItemsToAdd) 142Assert.Equal(count, collection.Count); 157Assert.Equal(count + 1, collection.Count); 173Assert.Equal(count * 2, collection.Count); 190Assert.Equal(count, collection.Count); 205Assert.Equal(count, collection.Count); 220Assert.Equal(count + 2, collection.Count); 233Assert.Equal(5, collection.Count); 273Assert.Equal(1, collection.Count); 285Assert.Equal(count, collection.Count); 318Assert.Equal(count, collection.Count); 323Assert.Equal(0, collection.Count); 337Assert.Equal(count, collection.Count); 344Assert.Equal(0, collection.Count); 381Assert.Equal(0, collection.Count); 446Assert.Equal(count + 2, collection.Count); 579Assert.Equal(count, collection.Count); 595Assert.Equal(count, collection.Count); 614Assert.Equal(count - 1, collection.Count); 633Assert.Equal(count - 1, collection.Count); 651Assert.Equal(count - 1, collection.Count); 679Assert.Equal(count, collection.Count);
Collections\List\IList.Generic.Tests.cs (19)
58if (casted.Count > 0) 71if (casted.Count > 0) 84if (casted.Count > 0) 151Assert.Equal(count, list.Count); 165Assert.Equal(count, list.Count); 408Assert.Equal(count, list.Count); 421Assert.Equal(count + 1, list.Count); 434Assert.Equal(count, list.Count); 448Assert.Equal(count + 1, list.Count); 462Assert.Equal(count + 1, list.Count); 477Assert.Equal(count + 1, list.Count); 492Assert.Equal(count + 1, list.Count); 514Assert.Equal(count + 2, list.Count); 547Assert.Equal(count, list.Count); 561Assert.Equal(count, list.Count); 573Assert.Equal(count, list.Count); 584Assert.Equal(count, list.Count); 588Assert.Equal(index, list.Count); 603Assert.Equal(count - index - 1, list.Count);
Collections\SegmentedArrayTests.cs (2)
60Assert.Equal(0, ((ICollection<IntPtr>)data).Count); 132Assert.Equal(length, ((ICollection<IntPtr>)data).Count);
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1341Assert.True(pos != null || spans.Count > 0, "Must specify a position or spans marking expected symbols for resolution");
InternalUtilities\SpecializedCollectionsTests.cs (1)
34Assert.Equal(0, emptySet.Count);
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (2)
82If e.Changes.Count = 0 Then 129If changes.Count <> 1 Then
LineCommit\CommitBufferManager.vb (1)
272If e.Changes.Count = 0 Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
TestSyntaxNodes.vb (7)
2876Assert.Equal(0, ChangesForDifferentTrees.Count) 2887Assert.Equal(1, ChangesFromTransform.Count) 2894Assert.Equal(1, changes2UsingCommonSyntax.Count) 3371Assert.Equal(4, x.Count) 3396Assert.Equal(0, x.Count) 3420Assert.Equal(1, x.Count) 3464Assert.Equal(1, x.Count)
Microsoft.CodeAnalysis.Workspaces (51)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
248using 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\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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (28)
Build\ProjectBuildManager.cs (2)
90if (loadedProjects != null && loadedProjects.Count > 0) 92Debug.Assert(loadedProjects.Count == 1);
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Formatting\FormattingTestBase.cs (1)
101if (changes.Count == 0)
Workspaces\TestWorkspace`1.cs (1)
670for (var i = 1; i < submissions.Count; i++)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\IntervalTreeTests.cs (1)
337Assert.Equal(spans.Count, tree.Count());
Microsoft.CSharp (6)
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 (177)
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 (15)
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); 469for (int b = 0; b < mapIndices.Buffers.Count; b++) 473index = 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.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.GenFacades (1)
SourceGenerator.cs (1)
79else if (seedTypes.Count > 1)
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\DiffUtil.cs (2)
54foreach (var edit in GetEdits(sequenceA, sequenceA.Count, sequenceB, sequenceB.Count).Reverse())
Microsoft.DotNet.SignCheckTask (2)
src\SignCheck.cs (2)
362if (result.NestedResults.Count > 0) 379if (result.NestedResults.Count > 0)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\ServiceClientModelFactory.cs (2)
302if (enumeration.Count == 1) 348bool hasProperties = schema.Properties?.Count > 0;
Microsoft.Extensions.AI (12)
ChatCompletion\FunctionInvokingChatClient.cs (6)
253options?.Tools is { Count: > 0 } && 354int contentsCount = contents.Count; 370options?.Tools is not { Count: > 0 } || 511int count = messages.Count; 525int count = content.Count; 681if (messages is null || messages.Count == 0)
ChatCompletion\OpenTelemetryChatClient.cs (1)
506Message = CreateAssistantEvent(response.Messages is { Count: 1 } ? response.Messages[0].Contents : response.Messages.SelectMany(m => m.Contents)),
Embeddings\CachingEmbeddingGenerator.cs (1)
36switch (valuesList.Count)
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)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Abstractions (20)
ChatCompletion\ChatMessage.cs (2)
106private AIContent? ContentForDebuggerDisplay => _contents is { Count: > 0 } ? _contents[0] : null; 110private string EllipsesForDebuggerDisplay => _contents is { Count: > 1 } ? ", ..." : string.Empty;
ChatCompletion\ChatResponse.cs (1)
124int messageCount = _messages?.Count ?? 0;
ChatCompletion\ChatResponseExtensions.cs (6)
61if (updates is ICollection<ChatResponseUpdate> { Count: 0 }) 85if (contentsList.Count > 0) 242int count = response.Messages.Count; 258if (response.Messages.Count == 0) 263&& response.Messages[response.Messages.Count - 1].MessageId is string lastMessageId 276message = response.Messages[response.Messages.Count - 1];
ChatCompletion\ChatResponseUpdate.cs (2)
144private AIContent? ContentForDebuggerDisplay => _contents is { Count: > 0 } ? _contents[0] : null; 148private string EllipsesForDebuggerDisplay => _contents is { Count: > 1 } ? ", ..." : string.Empty;
Contents\AIContentExtensions.cs (2)
23int count = list.Count; 66int count = messages.Count;
Embeddings\EmbeddingGeneratorExtensions.cs (1)
189int inputsCount = inputs.Count;
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)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
125if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
148if (typeInfo.Properties.Count > 0 &&
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Abstractions.Tests (22)
AssertExtensions.cs (2)
39if (expected.Count != actual.Count)
ChatCompletion\ChatMessageTests.cs (3)
104Assert.Equal(messageCount, message.Contents.Count); 278Assert.Equal(items.Count, deserializedMessage.Contents.Count);
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (2)
138Assert.Equal(expected.Count + (gapLength * ((numSequences - 1) + (gapBeginningEnd ? 2 : 0))), message.Contents.Count); 175Assert.Equal(8, message.Contents.Count);
ChatCompletion\ChatResponseUpdateTests.cs (1)
140Assert.Equal(5, result.Contents.Count);
Contents\FunctionCallContentTests..cs (1)
270Assert.Equal(5, content.Arguments.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);
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)
107Assert.Equal(original.Contents.Count, result.Contents.Count); 108for (int i = 0; i < original.Contents.Count; i++)
Microsoft.Extensions.AI.AzureAIInference (9)
AzureAIInferenceChatClient.cs (5)
318if (options.StopSequences is { Count: > 0 } stopSequences) 341if (options.Tools is { Count: > 0 } tools) 351if (result.ToolChoice is null && result.Tools.Count > 0) 470if (input.Contents.Count > 0) 511Debug.Assert(contents is { Count: > 0 }, "Expected non-empty contents");
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)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.AzureAIInference.Tests (3)
AzureAIInferenceChatClientTests.cs (1)
242Assert.Equal(i is < 10 or 11 ? 1 : 0, updates[i].Contents.Count);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (2)
39if (expected.Count != actual.Count)
Microsoft.Extensions.AI.Evaluation (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Console (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (27)
AgentQualityEvaluatorTests.cs (4)
102Assert.Equal(2, result.Metrics.Count); 135Assert.Equal(2, result.Metrics.Count); 158Assert.Equal(3, result.Metrics.Count); 198Assert.Equal(3, result.Metrics.Count);
NLPEvaluatorTests.cs (4)
67Assert.Equal(3, result.Metrics.Count); 94Assert.Equal(3, result.Metrics.Count); 120Assert.Equal(3, result.Metrics.Count); 141Assert.Equal(3, result.Metrics.Count);
QualityEvaluatorTests.cs (8)
104Assert.Equal(6, result.Metrics.Count); 143Assert.Equal(6, result.Metrics.Count); 180Assert.Equal(4, result.Metrics.Count); 254Assert.Equal(4, result.Metrics.Count); 261groundedness.Context?.Count is 1 && 266equivalence.Context?.Count is 1 && 271completeness.Context?.Count is 1 && 276retrieval.Context?.Count is 1 &&
SafetyEvaluatorTests.cs (11)
166Assert.Equal(6, result.Metrics.Count); 175groundednessPro.Context?.Count is 1 && 180ungroundedAttributes.Context?.Count is 1 && 241Assert.Equal(6, result.Metrics.Count); 250groundednessPro.Context?.Count is 1 && 255ungroundedAttributes.Context?.Count is 1 && 286Assert.Equal(7, result.Metrics.Count); 322Assert.Equal(7, result.Metrics.Count); 371Assert.Equal(7, result.Metrics.Count); 433Assert.Equal(7, result.Metrics.Count); 543Assert.Equal(5, result.Metrics.Count);
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (8)
ScenarioRunResultTests.cs (8)
231Assert.Equal(first!.Metrics.Count, second!.Metrics.Count); 267Assert.Equal(metric.Context.Count, deserializedMetric.Context.Count); 283Assert.Equal(metric.Metadata.Count, deserializedMetric.Metadata.Count); 337if (x?.Contents.Count != y?.Contents.Count)
Microsoft.Extensions.AI.Evaluation.Safety (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Integration.Tests (3)
PromptBasedFunctionCallingChatClient.cs (2)
47if (options?.Tools is { Count: > 0 }) 67for (var itemIndex = 0; itemIndex < message.Contents.Count; itemIndex++)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Ollama (7)
OllamaChatClient.cs (3)
192if (message.Content?.Length > 0 || update.Contents.Count == 0) 326Tools = options?.ToolMode is not NoneChatToolMode && options?.Tools is { Count: > 0 } tools ? tools.OfType<AIFunction>().Select(ToOllamaTool) : null, 370if (options.StopSequences is { Count: > 0 })
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)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.Ollama.Tests (4)
OllamaChatClientTests.cs (2)
193Assert.Equal(i < updates.Count - 1 ? 1 : 2, updates[i].Contents.Count); 201Assert.Equal(2, updates[updates.Count - 1].Contents.Count);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (2)
39if (expected.Count != actual.Count)
Microsoft.Extensions.AI.OpenAI (12)
OpenAIAssistantChatClient.cs (2)
273if (options.Tools is { Count: > 0 } tools) 279if (runOptions.ToolsOverride.Count == 0)
OpenAIChatClient.cs (4)
464if (options?.Tools is { Count: > 0 }) 523if (options.StopSequences is { Count: > 0 } stopSequences) 531if (options.Tools is { Count: > 0 } tools) 541if (result.ToolChoice is null && result.Tools.Count > 0)
OpenAIResponseChatClient.cs (2)
391if (options.Tools is { Count: > 0 } tools) 420if (result.ToolChoice is null && result.Tools.Count > 0)
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)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (1)
254Assert.Equal(i == 10 ? 0 : 1, updates[i].Contents.Count);
OpenAIResponseClientTests.cs (1)
271Assert.Equal((i >= 4 && i <= 12) || i == 16 ? 1 : 0, updates[i].Contents.Count);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (2)
39if (expected.Count != actual.Count)
Microsoft.Extensions.AI.Tests (16)
ChatCompletion\DistributedCachingChatClientTest.cs (6)
810Assert.Equal(expectedMessage.Contents.Count, actualMessage.Contents.Count); 812for (var itemIndex = 0; itemIndex < expectedMessage.Contents.Count; itemIndex++) 844Assert.Equal(expectedItem.Contents.Count, actualItem.Contents.Count); 846for (var itemIndex = 0; itemIndex < expectedItem.Contents.Count; itemIndex++)
ChatCompletion\FunctionInvokingChatClientTests.cs (8)
734Assert.Equal(5, response.Messages.Count); 807Assert.Equal(messages.Count, context.Messages.Count); 1056Assert.Equal(expectedMessage.Contents.Count, chatMessage.Contents.Count); 1057for (int j = 0; j < expectedMessage.Contents.Count; j++) 1150Assert.Equal(expectedMessage.Contents.Count, chatMessage.Contents.Count); 1151for (int j = 0; j < expectedMessage.Contents.Count; j++)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (2)
39if (expected.Count != actual.Count)
Microsoft.Extensions.AmbientMetadata.Application (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Caching.Abstractions (4)
Hybrid\HybridCache.cs (4)
175null or ICollection<string> { Count: 0 } => default, 176ICollection<string> { Count: 1 } => RemoveAsync(keys.First(), cancellationToken), 199null or ICollection<string> { Count: 0 } => default, 200ICollection<string> { Count: 1 } => RemoveByTagAsync(tags.Single(), cancellationToken),
Microsoft.Extensions.Caching.Hybrid (3)
Internal\TagSet.cs (2)
106switch (collection.Count) 118arr = new string[collection.Count];
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Compliance.Testing (1)
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)
1175if (attributeData.ConstructorArguments.Count != 1)
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
140var switchMappingsCopy = new Dictionary<string, string>(switchMappings.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (2)
27_descriptors = new ServiceDescriptor[descriptors.Count]; 134attributeData.ConstructorArguments.Count == 1 &&
Microsoft.Extensions.DependencyInjection.Abstractions (5)
Extensions\ServiceCollectionDescriptorExtensions.cs (4)
66int count = collection.Count; 471int count = services.Count; 532int count = collection.Count; 566for (int i = collection.Count - 1; i >= 0; i--)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (1)
401for (int i = collection.Count - 1; i >= 0; i--)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics (4)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
34int count = sortedTags.Count; 40if (tagsCol.Count != count) 84if (listCount > sortedTags.Count) 113return listCount == sortedTags.Count;
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
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)
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.Probes (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Diagnostics.Testing (3)
Logging\FakeLogCollector.cs (2)
111if (_options.FilteredLevels.Count > 0 && !_options.FilteredLevels.Contains(record.Level)) 117if (_options.FilteredCategories.Count > 0)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.FileSystemGlobbing (15)
Internal\PatternContexts\PatternContextLinear.cs (2)
83return Frame.SegmentIndex == Pattern.Segments.Count - 1; 88if (Frame.SegmentIndex >= Pattern.Segments.Count)
Internal\PatternContexts\PatternContextLinearInclude.cs (1)
28if (Frame.SegmentIndex < Pattern.Segments.Count)
Internal\PatternContexts\PatternContextRagged.cs (9)
68frame.SegmentIndex = Frame.SegmentGroup.Count; 83frame.SegmentIndex == frame.SegmentGroup.Count && 84frame.SegmentGroupIndex != Pattern.Contains.Count) 88if (frame.SegmentGroupIndex < Pattern.Contains.Count) 107if (Frame.StemItems.Count > 0) 109Frame.StemItems.RemoveAt(Frame.StemItems.Count - 1); 143return Frame.SegmentGroupIndex == Pattern.Contains.Count; 148if (Frame.SegmentIndex >= Frame.SegmentGroup.Count) 157int 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)
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 (9)
Logging\Internal\HttpClientLogger.cs (2)
63_logResponseHeaders = options.ResponseHeadersDataClasses.Count > 0; 64_logRequestHeaders = options.RequestHeadersDataClasses.Count > 0;
Logging\Internal\HttpRequestReader.cs (4)
83_logRequestBody = options.RequestBodyContentTypes.Count > 0; 84_logResponseBody = options.ResponseBodyContentTypes.Count > 0; 87_logRequestHeaders = options.RequestHeadersDataClasses.Count > 0; 88_logResponseHeaders = options.ResponseHeadersDataClasses.Count > 0;
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)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (1)
91for (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++)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
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\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\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)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Options.Contextual (1)
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++) 166for (var j = 0; j < attributeInstance.InstantiationLines.Count; j++) 170if (j != attributeInstance.InstantiationLines.Count - 1)
Microsoft.Extensions.Resilience (1)
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 (4)
Configuration\ConfigurationServiceEndpointProvider.cs (1)
57if (endpoints.Endpoints.Count != 0)
Configuration\ConfigurationServiceEndpointProvider.Log.cs (2)
33for (var i = endpoints.Count - added; i < endpoints.Count; i++)
PassThrough\PassThroughServiceEndpointProvider.cs (1)
16if (endpoints.Endpoints.Count == 0)
Microsoft.Extensions.ServiceDiscovery.Dns (1)
DnsServiceEndpointProviderBase.cs (1)
64if (endpoints.Endpoints.Count != 0)
Microsoft.Extensions.Telemetry (3)
Logging\Import\ProviderAliasUtilities.cs (2)
22for (int i = 0; i < attributes.Count; i++) 26attributeData.ConstructorArguments.Count > 0)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
268if (collection.Count == 0)
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
53if (receiver == null || receiver.TypeDeclarations.Count == 0)
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
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)
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)
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)
MetadataReportsGenerator.cs (2)
62((TypeDeclarationSyntaxReceiver)context.SyntaxReceiver).TypeDeclarations.Count == 0 || 68if ((context.SyntaxReceiver is not TypeDeclarationSyntaxReceiver || ((TypeDeclarationSyntaxReceiver)context.SyntaxReceiver).TypeDeclarations.Count == 0))
src\Generators\Microsoft.Gen.ComplianceReports\ComplianceReportsGenerator.cs (1)
53if (receiver == null || receiver.TypeDeclarations.Count == 0)
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
41receiver.ClassDeclarations.Count == 0 ||
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
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)
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)
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.cs (2)
1491 if (groups.Count == 0) 1575 if (groups.Count == 0)
VisualElement\VisualElement_StyleSheet.cs (1)
21 for (int i = 0; i < attrList.Count; i++)
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 (11)
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;
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.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)) 731var originalValueCount = destination == null ? 0 : destination.Count; 762if ((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)
68for (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.Http.Headers.Tests (13)
ContentDispositionHeaderValueTest.cs (1)
659Assert.Equal(2, contentDisposition.Parameters.Count);
CookieHeaderValueTest.cs (1)
306Assert.Equal(cookies?.Count > 0, result);
MediaTypeHeaderValueTest.cs (10)
134Assert.Equal(mediaType0.Parameters.Count, mediaType1.Parameters.Count); 145Assert.Equal(mediaType0.Parameters.Count, mediaType1.Parameters.Count); 161Assert.Equal(mediaType0.Parameters.Count, mediaType1.Parameters.Count); 183Assert.Equal(mediaType0.Parameters.Count, mediaType1.Parameters.Count); 210Assert.Equal(mediaType2.Parameters.Count, mediaType1.Parameters.Count);
SetCookieHeaderValueTest.cs (1)
463Assert.Equal(cookies?.Count > 0, result);
Microsoft.VisualStudio.LanguageServices (15)
InheritanceMargin\InheritanceGlyphManager.cs (1)
165if (lines.Count > 0)
NavigationBar\NavigationBarClient.cs (2)
101pcEntries = (uint)_projectItems.Count; 105pcEntries = (uint)_currentTypeItems.Count;
Preview\FileChange.cs (1)
90if (diff.Differences.Count == 0)
Utilities\VsEnumBSTR.cs (3)
29pceltCount = (uint)_values.Count; 36for (; i < celt && _currentIndex < _values.Count; i++, _currentIndex++) 56return _currentIndex < _values.Count
Utilities\VsEnumDebugName.cs (3)
29pceltCount = (uint)_values.Count; 36for (; i < celt && _currentIndex < _values.Count; i++, _currentIndex++) 60return _currentIndex < _values.Count
Venus\CodeBlockEnumerator.cs (3)
43pceltFetched = Math.Min(celt, (uint)(_codeBlocks.Count - _currentElement)); 69if (_currentElement > _codeBlocks.Count) 71_currentElement = _codeBlocks.Count;
Venus\ContainedDocument.cs (2)
733while (currentVisibleSpanIndex < visibleSpansInOriginal.Count && 740if (currentVisibleSpanIndex >= visibleSpansInOriginal.Count)
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (4)
1224for (var i = triviaList.Count - 1; i >= 0; i--) 1248if (commentList.Count == 0) 1297if (commentList.Count > 0) 1301var lastIndex = leadingTriviaList.FindIndex(t => t == commentList[commentList.Count - 1]);
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
51if (Arguments != null && Arguments.Count > 0)
PresentationBuildTasks (11)
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\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
4931for( int i = 0; i < attributes.Count; i++ )
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\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\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)
363int numManipulators = manipulators.Count; 390int count = parameters.Count; 391for (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)
263Invariant.Assert(textBounds.Count > 0); 265for (int boundIndex = 0; boundIndex < textBounds.Count; boundIndex++) 374return (((TextSpan<TextRun>)runs[runs.Count - 1]).Value is TextEndOfParagraph); 500Invariant.Assert(textBounds != null && textBounds.Count == 1, "Expecting exactly one TextBounds for a single text position."); 505Invariant.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 ) 1029if ( 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)
176Invariant.Assert(textBounds.Count > 0); 179for (int boundIndex = 0; boundIndex < textBounds.Count; boundIndex++) 312Debug.Assert(collapsedRanges.Count == 1, "Multiple collapsed ranges are not supported."); 418return (((TextSpan<TextRun>)runs[runs.Count-1]).Value is TextEndOfParagraph); 470Invariant.Assert(textBounds != null && textBounds.Count == 1, "Expecting exactly one TextBounds for a single text position."); 475Debug.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)
864List<AttachedAnnotationChangedEventArgs> eventsToFire = new List<AttachedAnnotationChangedEventArgs>(attachedAnnotations.Count); 1008if ((attachedAnnotations != null) && (attachedAnnotations.Count > 0)) 1312if (annotations.Count > 0) 1315IAttachedAnnotation[] list = new IAttachedAnnotation[annotations.Count]; 1375if (annotations.Count > 0) 1378IAttachedAnnotation[] list = new IAttachedAnnotation[annotations.Count]; 1415IAttachedAnnotation[] 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)
854for (int i=newItems.Count-1; i>=0; --i) 1269for (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)
1398if (args.Ranges.Count > 0) 1410for (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)
1177else if (keys.Count > 0) 1255_numDefer = keyCollection.Count; 1261for (int i = 0; i < keyCollection.Count; i++) 1324Debug.Assert(staticResources != null && staticResources.Count > 0); 1325for (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)
PresentationFramework.Fluent.Tests (1)
ResourceTests\FluentResourceDictionaryTests.cs (1)
112int count = s_colorDictionarySourceList.Count;
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)
307if (paperSizes.Count > 0) 336if (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)
168if (nUps.Count > 0) 259if (bins.Count > 0) 266for (int i = 0; i < bins.Count; i++) 310string optionDisplayName = (i < binDisplayNames.Count) ? binDisplayNames[i] : null; 328if (paperSizeCodes.Count > 0) 335for (int i = 0; i < paperSizeCodes.Count; i++) 353((i < paperSizeDisplayNames.Count) || (i < paperSizes.Count))) 355string optionDisplayName = (i < paperSizeDisplayNames.Count) ? paperSizeDisplayNames[i] : null; 358if (i < paperSizes.Count) 386if (mediaTypes.Count > 0 && mediaTypeDisplayNames.Count > 0) 393for (int i = 0; i < mediaTypes.Count; i++) 418optionDisplayName = (i < mediaTypeDisplayNames.Count) ? mediaTypeDisplayNames[i] : null; 494if(resolutions.Count > 0) 501for (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)
Replay (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
Roslyn.Diagnostics.Analyzers (52)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
Roslyn.Diagnostics.CSharp.Analyzers (18)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (1)
364if (result.GetTextChanges(cancellationToken).Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (1)
54get { return _textChanges.Count > 0; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (4)
62for (var i = 0; i < xNameParts.Count && i < yNameParts.Count; i++) 71return xNameParts.Count - yNameParts.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
163for (var i = 0; i < list.Count - 1; i++) 176for (var i = 1; i < list.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseNamespaceDeclarationSyntaxExtensions.cs (1)
19if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (1)
106if (usingDirectives.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
326if (modifierTokens.Count >= 2) 329if (modifierTokens.Count == 1) 352if (modifierTokens.Count > 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
21return parts[parts.Count - 1];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (1)
74.Skip(reservedNames.Count)];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
151if (usingsToRemove.Count == 0) 205if (usingsToRemove.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
646if (map.Count > 0 && (bestMap == null || map.Count > bestMap.Count))
Shared (6)
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)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
125if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions)
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
148if (typeInfo.Properties.Count > 0 &&
Throw\Throw.cs (1)
268if (collection.Count == 0)
Swaggatherer (4)
SwaggathererApplication.cs (4)
171for (var i = 0; i < entry.Template.Segments.Count; i++) 191for (var k = 0; k < entry.Template.Segments.Count; k++) 236if (template.Segments.Count == 0) 242for (var i = 0; i < template.Segments.Count; i++)
System.CodeDom (1)
System\CodeDom\Compiler\CompilerInfo.cs (1)
51if (_providerOptions.Count > 0)
System.Collections (13)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
37int count = ic.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (1)
24T[] items = new T[_collection.Count];
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\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
46ValidateCopyToArguments(collection.Count, array, index);
System\Collections\Generic\OrderedDictionary.cs (2)
166this(dictionary?.Count ?? 0, comparer) 200this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
System\Collections\Generic\PriorityQueue.cs (2)
408if (collection is not null && (count = collection.Count) > _nodes.Length - _size) 471(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)
1326if (other is ICollection<T> c && c.Count == 0)
System.Collections.Concurrent (6)
System\Collections\Concurrent\ConcurrentDictionary.cs (2)
288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count), 2718var keyValuePairs = new KeyValuePair<TKey, TValue>[_dictionary.Count];
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 (13)
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\FrozenSetInternalBase.cs (3)
37int otherCount = otherAsCollection.Count; 64int otherCount = otherAsCollection.Count; 108int otherCount = otherAsCollection.Count;
System\Collections\Immutable\ImmutableArray_1.Builder.cs (2)
1076if (indicesToRemove.Count == 0) 1096_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.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 (2)
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
68if (metadata.Count == 0) 94if (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\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
34int count = sortedTags.Count; 40if (tagsCol.Count != count) 84if (listCount > sortedTags.Count) 113return listCount == sortedTags.Count;
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
1058PackUriHelper.ValidatedPartUri[] partKeys = new PackUriHelper.ValidatedPartUri[_partList.Keys.Count];
System.Linq (48)
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)
273private int CountForDebugger => _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)
56int 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)
290if (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.Security (1)
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (1)
151return c != null ? c.Count : 1;
System.ObjectModel (1)
System\Collections\Generic\DebugView.cs (1)
24T[] items = new T[_collection.Count];
System.Private.CoreLib (56)
src\libraries\Common\src\System\Collections\Generic\EnumerableHelpers.cs (1)
37int count = ic.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (1)
94int count = c.Count;
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\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (8)
105int count = coll.Count; 834if (otherAsCollection.Count == 0) 939if (Count > otherAsCollection.Count) 975if (otherAsCollection.Count <= Count) 1020if (otherAsCollection.Count == 0) 1064if (otherAsCollection.Count == 0) 1141return otherAsCollection.Count == 0; 1160if (Count > otherAsCollection.Count)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ICollectionDebugView.cs (1)
24T[] items = new T[_collection.Count];
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\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (3)
68int count = c.Count; 252int count = c.Count; 823int count = c.Count;
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\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
46ValidateCopyToArguments(collection.Count, array, index);
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\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\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (2)
34public int Count => _set.Count; 38_set.Count == 0 ? ((IEnumerable<T>)Array.Empty<T>()).GetEnumerator() :
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
3050Debug.Assert(data.ConstructorArguments.Count <= 1); 3052if (data.ConstructorArguments.Count == 1) 3056else if (data.ConstructorArguments.Count == 0) 3442if ((flags & EventManifestOptions.Strict) != 0 && (manifest?.Errors.Count > 0 || exception != null)) 3446if (manifest?.Errors.Count > 0)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
87for (int i = 0; i < Keys.Count; i++)
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeData.cs (2)
58int constructorArgumentsCount = constructorArguments.Count; 67int namedArgumentsCount = namedArguments.Count;
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
66int count = array.Count;
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (3)
46attribute.ConstructorArguments.Count == 1) 309attribute.ConstructorArguments.Count == 1) 401attribute.ConstructorArguments.Count == 1)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
5949count = taskCollection.Count; 6246int count = taskCollection.Count; 6732int count = tasksAsCollection.Count;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (2)
2318int numTasks = tasks.Count; 2346int numTasks = tasks.Count;
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
102CustomAttributeData[] pca = new CustomAttributeData[customAttributes.Count + pseudoAttributes.Count]; 225for (int i = 0; i < attrs.Count; i++)
src\System\Reflection\RuntimeParameterInfo.cs (2)
378Debug.Assert(args.Count == 5); 398Debug.Assert(attr.ConstructorArguments.Count == 1);
src\System\RuntimeType.CoreCLR.cs (1)
1588for (int i = 0; i < attrs.Count; i++)
System.Private.DataContractSerialization (21)
System\Runtime\Serialization\DataContract.cs (1)
1898if (nestedParameterCounts.Count > 1 || !genericNameProvider.ParametersFromBuiltInNamespaces)
System\Runtime\Serialization\DataContractSet.cs (3)
487genericParameters = new object[genInfo.Parameters.Count]; 488DataContract[] structureCheckContracts = new DataContract[genInfo.Parameters.Count]; 489for (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)
844else if (dataNode.Size != dataNode.Items.Count) 845throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArraySizeAttributeIncorrect, arraySize, dataNode.Items.Count)); 851dataNode.Size = dataNode.Items.Count; 1056for (int i = 0; i < xmlAttributes.Count; i++) 1063for (int i = 0; i < xmlChildNodes.Count; i++)
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (5)
428IncrementCollectionCount(xmlWriter, collection.Count); 666for (int i = 0; i < members.Count; i++) 764for (int i = 0; i < members.Count; i++) 785for (int i = 0; i < items.Count; i++) 809for (int i = 0; i < members.Count; i++)
System.Private.Xml (118)
System\Xml\Schema\XdrValidator.cs (1)
304for (int i = 0; i < context.ElementDecl.DefaultAttDefs!.Count; ++i)
System\Xml\Schema\XmlSchemaValidator.cs (1)
1024for (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\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)
512for (int i = 0; i < tmpl.Content.Count; i++) 701for (int i = from; i < instructions.Count; i++) 767i = instructions.Count; 1174for (int i = 0; i < content.Count; i++) 1260if (content.Count > 0) 1414for (int i = cases.Count - 1; 0 <= i; i--) 1485else if (content.Count != 0) 1525while (i < content.Count) 2530if (args.Count <= pos || args[pos].Name != name) 2568if (actualArgs.Count != formalArgs.Count) 2579for (int actArg = 0; actArg < actualArgs.Count; actArg++) 2660for (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++) 218XmlExtensionFunction? scrFunc = _compiler.Scripts.ResolveFunction(name, ns, args.Count, (IErrorHelper)this); 241for (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) 1139XmlExtensionFunction? scrFunc = _compiler.Scripts.ResolveFunction(name, ns, args.Count, default(NullErrorHelper)); 1352int last = content.Count - 1; 1478Debug.Assert(parent.Content.Count == split + 1);
System.Private.Xml.Linq (1)
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)
306if (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.Syndication (3)
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (2)
35for (int i = 0; i < source.Items.Count; ++i) 135for (int i = 0; i < Items.Count; ++i)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
91for (int i = 0; i < srcList.Count; ++i)
System.Text.Json (6)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
122int count = children.Count;
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 (1)
87if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions)
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\ReadStackFrame.cs (1)
155AssignedProperties = new BitArray(typeInfo.Properties.Count);
System.Text.Json.SourceGeneration (1)
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)
172static 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)
17680, list.Count, parallelOptions, (i) => body(list[i]), null, null, null, null); 17730, list.Count, parallelOptions, null, (i, state) => bodyWithState(list[i], state), null, null, null); 17780, list.Count, parallelOptions, null, (i, state) => bodyWithStateAndIndex(list[i], state, i), null, null, null); 17830, list.Count, parallelOptions, null, null, (i, state, local) => bodyWithStateAndLocal(list[i], state, local), localInit, localFinally); 17880, 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.Windows.Forms.Tests (31)
System\Windows\Forms\CursorConverterTests.cs (1)
197Assert.Equal(28, values.Count);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (21)
249Assert.Equal(2, neighboringToolsRectangles.Count); 267Assert.Equal(3, neighboringToolsRectangles.Count); 286Assert.Equal(2, neighboringToolsRectangles.Count); 304Assert.Equal(3, neighboringToolsRectangles.Count); 323Assert.Equal(4, neighboringToolsRectangles.Count); 343Assert.Equal(3, neighboringToolsRectangles.Count); 362Assert.Equal(2, neighboringToolsRectangles.Count); 380Assert.Equal(3, neighboringToolsRectangles.Count); 399Assert.Equal(2, neighboringToolsRectangles.Count); 418Assert.Equal(2, neighboringToolsRectangles.Count); 438Assert.Equal(3, neighboringToolsRectangles.Count); 459Assert.Equal(2, neighboringToolsRectangles.Count); 479Assert.Equal(3, neighboringToolsRectangles.Count); 500Assert.Equal(4, neighboringToolsRectangles.Count); 522Assert.Equal(3, neighboringToolsRectangles.Count); 543Assert.Equal(2, neighboringToolsRectangles.Count); 562Assert.Equal(3, neighboringToolsRectangles.Count); 582Assert.Equal(2, neighboringToolsRectangles.Count); 599Assert.Equal(2, neighboringToolsRectangles.Count); 616Assert.Equal(3, neighboringToolsRectangles.Count); 634Assert.Equal(2, neighboringToolsRectangles.Count);
System\Windows\Forms\ScrollBarTests.cs (1)
2495Assert.Equal(expected.Count, callCount);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (8)
144Assert.Equal(2, neighboringRectangles.Count); 179Assert.Equal(2, neighboringRectangles.Count); 198Assert.Equal(2, neighboringRectangles.Count); 217Assert.Equal(2, neighboringRectangles.Count); 238Assert.Equal(2, neighboringRectangles.Count); 257Assert.Equal(2, neighboringRectangles.Count); 278Assert.Equal(2, neighboringRectangles.Count); 298Assert.Equal(2, neighboringRectangles.Count);
System.Xaml (43)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1304_count = collection.Count; 1990int count = collection.Count;
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++)
System.Xaml.Tests (2)
System\Xaml\XamlTypeTests.cs (2)
37Assert.Equal(typeArguments != null && typeArguments.Count > 0 ? typeArguments : null, type.TypeArguments); 67Assert.Equal(typeArguments != null && typeArguments.Count > 0 ? typeArguments : null, type.TypeArguments);
Test.Utilities (47)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
Text.Analyzers (52)
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; 724return (list.Count == 1) ? list[0] : default;
src\Dependencies\Collections\Internal\ICollectionDebugView`1.cs (1)
33var items = new T[_collection.Count];
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\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
165if (items is ICollection<T> { Count: 0 })
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\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\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
89var count = c.Count; 306var count = c.Count; 906var count = c.Count;
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\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Collection.cs (1)
48return this.Underlying.Count;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
52return collectionoft.Count == count; 89return collectionoft.Count > count; 126return collectionoft.Count < count;
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
299if (set1.Length > set2.Count)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StackExtensions.cs (1)
51for (var i = range.Count - 1; i >= 0; i--)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
45for (uint i = 1; i <= existingConstants.Count; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
151if (collection.Count == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyListExtensions.cs (1)
41public int Count => list.Count;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
16if (index < sequence.Count && predicate(sequence[index]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (3)
461if (t1.Count != t2.Count) 470for (var i = 0; i < t1.Count; ++i)
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IParameterSymbolExtensions.cs (1)
15var result = new FixedSizeArrayBuilder<IParameterSymbol>(parameters.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
112if (referencingStatements.Count == 0)
vbc (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
VBCSCompiler (2)
src\Compilers\Shared\BuildProtocol.cs (2)
87var requestLength = args.Count + 1 + (libDirectory == null ? 0 : 1); 103for (int i = 0; i < args.Count; ++i)
WindowsBase.Tests (16)
System\Windows\NameScopeTests.cs (16)
133Assert.Equal(1, nameScope.Keys.Count); 136Assert.Equal(1, nameScope.Values.Count); 146Assert.Equal(1, nameScope.Keys.Count); 149Assert.Equal(1, nameScope.Values.Count); 254Assert.Equal(1, nameScope.Keys.Count); 257Assert.Equal(1, nameScope.Values.Count); 267Assert.Equal(1, nameScope.Keys.Count); 270Assert.Equal(1, nameScope.Values.Count); 348Assert.Equal(1, nameScope.Keys.Count); 351Assert.Equal(1, nameScope.Values.Count); 361Assert.Equal(1, nameScope.Keys.Count); 364Assert.Equal(1, nameScope.Values.Count); 851Assert.Equal(1, nameScope.Keys.Count); 854Assert.Equal(1, nameScope.Values.Count); 864Assert.Equal(1, nameScope.Keys.Count); 867Assert.Equal(1, nameScope.Values.Count);
XmlFileLogger (1)
LogProcessNode.cs (1)
126if (Properties.Properties.Count > 0)
xunit.assert (2)
Sdk\CollectionTracker.cs (2)
359 if (setX.Count != setY.Count)
xunit.console (1)
ConsoleRunner.cs (1)
47if (commandLine.Project.Assemblies.Count == 0)