141 implementations of Count
Microsoft.AspNetCore.Components (2)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
314public int Count => _count;
src\Http\Routing\src\PathTokenizer.cs (1)
28public int Count
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
211public int Count => _form.Count;
Microsoft.AspNetCore.Hosting (4)
Internal\HostingApplicationDiagnostics.cs (1)
542public int Count => 2;
Internal\HostingRequestFinishedLog.cs (1)
22public int Count => 12;
Internal\HostingRequestStartingLog.cs (1)
21public int Count => 10;
Internal\HostingRequestUnhandledLog.cs (1)
19public int Count => 7;
Microsoft.AspNetCore.Http (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
144public int Count => _dictionaryStorage != null ? _dictionaryStorage.Count : _count;
Microsoft.AspNetCore.Http.Abstractions (2)
Routing\EndpointMetadataCollection.cs (1)
63public int Count => _items.Length;
Routing\RouteValueDictionary.cs (1)
314public int Count => _count;
Microsoft.AspNetCore.Http.Connections (1)
Internal\ConnectionLogScope.cs (1)
33public int Count => string.IsNullOrEmpty(ConnectionId) ? 0 : 1;
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\ConnectionLogScope.cs (1)
41public int Count => string.IsNullOrEmpty(ConnectionId) ? 0 : 1;
Microsoft.AspNetCore.HttpLogging (1)
HttpLog.cs (1)
25public int Count => _keyValues.Count;
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelStateDictionary.cs (1)
137public int Count { get; private set; }
ModelBinding\Validation\ValidationStateDictionary.cs (1)
55public int Count => _inner.Count;
Microsoft.AspNetCore.Mvc.Core (2)
Diagnostics\EventData.cs (1)
26int IReadOnlyCollection<KeyValuePair<string, object>>.Count => Count;
MvcCoreLoggerExtensions.cs (1)
307public int Count => 2;
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
AttributeDictionary.cs (1)
57public int Count => _items == null ? 0 : _items.Count;
ViewComponents\DefaultViewComponentInvoker.cs (1)
309public int Count => 2;
Microsoft.AspNetCore.Routing (1)
PathTokenizer.cs (1)
28public int Count
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\ConnectionLogScope.cs (1)
33public int Count => 1;
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
144public int Count => _dictionaryStorage != null ? _dictionaryStorage.Count : _count;
Microsoft.AspNetCore.SignalR.Client.Core (1)
Internal\ConnectionLogScope.cs (1)
42public int Count => string.IsNullOrEmpty(ConnectionId) ? 0 : 1;
Microsoft.AspNetCore.SignalR.Core (1)
Internal\HubGroupList.cs (1)
45public int Count => _groups.Count;
Microsoft.Build (2)
Collections\ArrayDictionary.cs (1)
84public int Count => count;
ReadOnlyEmptyDictionary.cs (1)
57public int Count
Microsoft.Build.Framework (14)
ImmutableSegmentedDictionary`2.cs (1)
84public int Count => _dictionary.Count;
ImmutableSegmentedDictionary`2+Builder.cs (1)
54public int Count => ReadOnlyDictionary.Count;
ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (1)
26public int Count => _dictionary.Count;
ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (1)
26public int Count => _dictionary.Count;
ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
22public int Count => _dictionary.Count;
ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
22public int Count => _dictionary.Count;
ImmutableSegmentedList`1.cs (1)
81public int Count => _list.Count;
ImmutableSegmentedList`1+Builder.cs (1)
24public int Count => _builder.Count;
ImmutableSegmentedList`1+ValueBuilder.cs (1)
33public int Count => ReadOnlyList.Count;
SegmentedArray`1.cs (1)
129int IReadOnlyCollection<T>.Count => Length;
SegmentedDictionary`2.cs (3)
165public int Count => _count - _freeCount; 1301public int Count => _dictionary.Count; 1501public int Count => _dictionary.Count;
SegmentedList`1.cs (1)
152public int Count => _size;
Microsoft.Build.Tasks.Core (1)
ReadOnlyEmptyDictionary.cs (1)
57public int Count
Microsoft.Build.Utilities.Core (1)
ReadOnlyEmptyDictionary.cs (1)
57public int Count
Microsoft.Extensions.Diagnostics.HealthChecks (2)
DefaultHealthCheckService.cs (1)
301public int Count => _values.Count;
HealthCheckLogScope.cs (1)
14int IReadOnlyCollection<KeyValuePair<string, object>>.Count { get; } = 1;
Microsoft.Extensions.Http (1)
Logging\HttpHeadersLogValue.cs (1)
74public int Count => Values.Count;
Microsoft.Extensions.Logging (1)
LoggerFactoryScopeProvider.cs (1)
171public int Count { get; }
Microsoft.Extensions.Logging.Abstractions (8)
FormattedLogValues.cs (1)
78public int Count
LoggerMessage.cs (7)
489public int Count => 1; 533public int Count => 2; 585public int Count => 3; 612public int Count => 4; 668public int Count => 5; 730public int Count => 6; 796public int Count => 7;
Microsoft.Extensions.Primitives (1)
StringValues.cs (1)
91public int Count
MSBuild (1)
ReadOnlyEmptyDictionary.cs (1)
57public int Count
PresentationFramework (2)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (2)
73public int Count 433public int Count => _FromVectorView.Count;
SignalRSamples (1)
ConnectionList.cs (1)
26public int Count => _connections.Count;
SocialWeather (1)
ConnectionList.cs (1)
27public int Count => _connections.Count;
System.Collections (8)
System\Collections\Generic\LinkedList.cs (1)
49public int Count
System\Collections\Generic\PriorityQueue.cs (1)
931public int Count => _queue._size;
System\Collections\Generic\SortedDictionary.cs (3)
143public int Count 595public int Count 756public int Count
System\Collections\Generic\SortedList.cs (1)
282public int Count
System\Collections\Generic\SortedSet.cs (1)
266public int Count
System\Collections\Generic\Stack.cs (1)
57public int Count => _size;
System.Collections.Concurrent (4)
System\Collections\Concurrent\BlockingCollection.cs (1)
103public int Count
System\Collections\Concurrent\ConcurrentBag.cs (1)
486public int Count
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1116public int Count
System\Collections\Concurrent\ConcurrentStack.cs (1)
134public int Count
System.Collections.Immutable (14)
System\Collections\Frozen\FrozenDictionary.cs (1)
314public int Count => CountCore;
System\Collections\Frozen\FrozenSet.cs (1)
228public int Count => CountCore;
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
90public int Count
System\Collections\Immutable\ImmutableArray_1.cs (1)
67int IReadOnlyCollection<T>.Count
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
140public int Count
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
131public 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)
140public 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.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\TagList.cs (1)
96public readonly int Count => _tagsCount;
System.Linq (4)
System\Linq\Lookup.cs (1)
307public int Count => 0;
System\Linq\Range.SpeedOpt.cs (1)
38public int Count => _end - _start;
System\Linq\Repeat.SpeedOpt.cs (1)
34public int Count => _count;
System\Linq\SkipTake.SpeedOpt.cs (1)
104public int Count
System.Linq.Expressions (1)
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
551public int Count => _provider.ParameterCount;
System.Net.Http (3)
System\Net\Http\Headers\HeaderStringValues.cs (1)
36public int Count => _value switch
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
28public int Count => _headers?.Count ?? 0;
System\Net\Http\HttpRequestOptions.cs (1)
50int IReadOnlyCollection<KeyValuePair<string, object?>>.Count => Options.Count;
System.Net.Primitives (1)
System\Net\CookieCollection.cs (1)
121public int Count
System.Net.WebSockets.Client (1)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (1)
41public int Count => _headers.Count;
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\Concurrent\ConcurrentQueue.cs (1)
256public int Count
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (3)
209public int Count => _count - _freeCount; 1502public int Count => _dictionary.Count; 1697public int Count => _dictionary.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
354public 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\Generic\Queue.cs (1)
55public 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)
32public int Count => list.Count;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (3)
71public int Count => m_dictionary.Count; 283public int Count => _collection.Count; 336public int Count => _collection.Count;
System.Reflection.Metadata (25)
System\Reflection\Metadata\PortablePdb\HandleCollections.Debug.cs (7)
27public int Count 126public int Count 232public int Count 440public int Count 546public int Count 645public int Count 752public int Count
System\Reflection\Metadata\TypeSystem\HandleCollections.TypeSystem.cs (18)
26public int Count 134public int Count 251public int Count 372public int Count 479public int Count 599public int Count 719public int Count 839public int Count 955public int Count 1054public int Count 1166public int Count 1261public int Count 1351public int Count 1441public int Count 1531public int Count 1664public int Count 1775public int Count 1865public int Count
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
55public int Count => _headerParameters.Count;
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\ImmutableEquatableArray.cs (1)
22public int Count => _values.Length;
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\CaptureCollection.cs (1)
31public int Count => _capcount;
System\Text\RegularExpressions\GroupCollection.cs (2)
36public int CountCount => _match._matchcount.Length;
System\Text\RegularExpressions\MatchCollection.cs (1)
45public int Count
821 references to Count
Diagnostics.EFCore.FunctionalTests (1)
MigrationsEndPointMiddlewareTest.cs (1)
134Assert.Equal(2, appliedMigrations.Count);
dotnet-dev-certs (2)
Program.cs (2)
331reporter.Output(certificates.Count switch 334_ => $"{certificates.Count} {certificateState} certificates were found: {CertificateManager.ToCertificateDescription(certificates)}"
HttpStress (1)
Program.cs (1)
47if (cmdline.Errors.Count > 0)
illink (3)
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
101 if (diagnostic.AdditionalLocations.Count == 0)
ILLink.RoslynAnalyzer (2)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (2)
91 Debug.Assert (argumentValues.Count == 1); 1084 if (argumentValues.Count > argsParam) {
KeyManagementSample (2)
Program.cs (2)
38Console.WriteLine($"The key ring contains {allKeys.Count} key(s)."); 56Console.WriteLine($"The key ring contains {allKeys.Count} key(s).");
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (3)
213Assert.True(routeParameter.Policies.Length == parsedRoutePattern.ParameterPolicies.Count, "ParameterPolicies"); 214for (var i = 0; i < parsedRoutePattern.ParameterPolicies.Count; i++) 234parsedRoutePatterns.Count == tree.RouteParameters.Length,
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
381var messages = new List<string>(exceptions.Count);
Microsoft.AspNetCore.Authorization.Policy (4)
AuthorizationMiddleware.cs (1)
123if (requirementData.Count > 0)
AuthorizationMiddlewareResultHandler.cs (2)
28if (policy.AuthenticationSchemes.Count > 0) 42if (policy.AuthenticationSchemes.Count > 0)
PolicyEvaluator.cs (1)
36if (policy.AuthenticationSchemes != null && policy.AuthenticationSchemes.Count > 0)
Microsoft.AspNetCore.Authorization.Test (4)
AuthorizationBuilderTests.cs (1)
102Assert.Equal(1, policy.Requirements.Count);
AuthorizationEndpointConventionBuilderExtensionsTests.cs (2)
164Assert.Equal(1, policy.Requirements.Count); 190Assert.Equal(1, policy.Requirements.Count);
AuthorizationPolicyFacts.cs (1)
65Assert.Equal(1, combined.Requirements.Count);
Microsoft.AspNetCore.Components (43)
ParameterView.cs (1)
435if (nextIndex < _cascadingParameters.Count)
Rendering\ComponentState.cs (4)
47if (_cascadingParameters.Count != 0) 198remainingCascadingParameters ??= new(_cascadingParameters.Count /* upper bound on capacity needed */); 249var numCascadingParameters = _cascadingParameters!.Count; 266var numCascadingParameters = _cascadingParameters!.Count;
Routing\RouteTable.cs (2)
101else if (parameter.ParameterPolicies.Count > 0 && !parameter.IsCatchAll) 105for (var i = 0; i < parameter.ParameterPolicies.Count; i++)
Routing\RouteTableFactory.cs (4)
231for (var k = 0; k < left.RoutePattern.PathSegments.Count; k++) 235if (leftSegment.Parts.Count != rightSegment.Parts.Count) 241for (var l = 0; l < leftSegment.Parts.Count; l++)
src\Http\Routing\src\Patterns\RoutePattern.cs (1)
144var parametersCount = parameters.Count;
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (6)
476for (var j = 0; j < segment.Parts.Count; j++) 546for (var i = 0; i < segment.Parts.Count; i++) 610parameter.ParameterPolicies.Count > 0) 617parameterConstraints = new List<RoutePatternParameterPolicyReference>(parameter.ParameterPolicies.Count); 621if (parameter.ParameterPolicies.Count > 0) 627&& parameter.ParameterPolicies.Count == 0
src\Http\Routing\src\Patterns\RoutePatternMatcher.cs (9)
33_hasDefaultValue = new bool[RoutePattern.PathSegments.Count]; 34_defaultValues = new object[RoutePattern.PathSegments.Count]; 36for (var i = 0; i < RoutePattern.PathSegments.Count; i++) 86var pathSegment = i >= RoutePattern.PathSegments.Count ? null : RoutePattern.PathSegments[i]; 106for (; i < RoutePattern.PathSegments.Count; i++) 163for (; i < RoutePattern.PathSegments.Count; i++) 291var indexOfLastSegment = routeSegment.Parts.Count - 1; 339Debug.Assert(routeSegment.Parts.Count > 1); 402if (indexOfLastSegmentUsed == (routeSegment.Parts.Count - 1))
src\Http\Routing\src\Patterns\RoutePatternParser.cs (2)
322for (var j = 0; j < segment.Parts.Count; j++) 327(i != segments.Count - 1 || j != segment.Parts.Count - 1))
src\Http\Routing\src\Patterns\RoutePatternPathSegment.cs (1)
35public bool IsSimple => Parts.Count == 1;
src\Http\Routing\src\Template\RoutePrecedence.cs (8)
60ValidateSegementLength(routePattern.PathSegments.Count); 64for (var i = 0; i < routePattern.PathSegments.Count; i++) 114ValidateSegementLength(routePattern.PathSegments.Count); 120for (var i = 0; i < routePattern.PathSegments.Count; i++) 179if (pathSegment.Parts.Count > 1) 194if (parameterPart.ParameterPolicies.Count > 0) 251if (pathSegment.Parts.Count > 1) 276if (parameterPart.ParameterPolicies.Count > 0)
src\Http\Routing\src\Tree\UrlMatchingTree.cs (5)
82for (var i = 0; i < entry.RoutePattern.PathSegments.Count; i++) 98Debug.Assert(segment.Parts.Count == 1); 185if (parameterPart.ParameterPolicies.Count > 0 && !parameterPart.IsCatchAll) 207if (parameterPart.ParameterPolicies.Count > 0 && parameterPart.IsCatchAll) 252for (var i = currentParameterIndex; i < segments.Count; i++)
Microsoft.AspNetCore.Components.Endpoints (16)
Discovery\AssemblyComponentLibraryDescriptor.cs (2)
50return $"Assembly = {AssemblyName}, Pages = {Pages.Count}, Components = {Components.Count}";
Discovery\ComponentCollectionBuilder.cs (2)
51totalCount += value.Count; 63for (var i = 0; i < components.Count; i++, current++)
Discovery\PageCollectionBuilder.cs (2)
50totalCount += value.Count; 63for (var i = 0; i < pages.Count; i++)
Discovery\RazorComponentApplication.cs (3)
40for (var i = 0; i < Components.Count; i++) 65return $"Pages = {Pages.Count}, Components = {Components.Count}";
FormMapping\Converters\FileConverter.cs (2)
42for (var i = 0; i < targetFiles.Count; i++) 67if (formFileCollection.Count == 0)
FormMapping\FormDataReader.cs (3)
178return _readOnlyMemoryKeys.Count > 0; 183_prefixResolver = new PrefixResolver(_readOnlyMemoryKeys.Keys, _readOnlyMemoryKeys.Count); 324$"Key count = {_readOnlyMemoryKeys.Count}, Prefix = {_currentPrefixBuffer}, Error count = {_errorCount}, Current depth = {_currentDepth}";
FormMapping\HttpContextFormValueMapper.cs (1)
117if (form.Count == 0)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
64if (state is not null && state.Count > 0)
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
HotReloadServiceTests.cs (1)
62Assert.Equal(2, endpointDataSource.Endpoints.Count);
RazorComponentEndpointDataSourceTest.cs (1)
25Assert.Equal(2, endpoints.Count);
RazorComponentResultTest.cs (2)
37Assert.Equal(1, result.Parameters.Count); 46Assert.Equal(2, result.Parameters.Count);
Microsoft.AspNetCore.Components.Server (12)
Circuits\CircuitFactory.cs (2)
64if (components.Count > 0) 89var circuitHandlers = components.Count == 0 ? [] : scope.ServiceProvider.GetServices<CircuitHandler>()
Circuits\CircuitHost.cs (7)
121if (Descriptors.Count > 0) 129var count = Descriptors.Count; 146if (Descriptors.Count > 0) 156_isFirstUpdate = Descriptors.Count == 0; 632if (circuitHandlers.Count == 0) 640for (var i = circuitHandlers.Count - 1; i >= 0; i--) 743if (Descriptors.Count > 0)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
64if (state is not null && state.Count > 0)
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (2)
300if (parameterTypes.Count != argumentCount) 303$"Invocation provides {argumentCount} argument(s) but target expects {parameterTypes.Count}.");
Microsoft.AspNetCore.Components.Web (5)
Forms\InputBase.cs (1)
319if (AdditionalAttributes!.Count == 1)
Forms\InputFile\InputFileChangeEventArgs.cs (4)
25public int FileCount => _files.Count; 31public IBrowserFile File => _files.Count switch 46if (_files.Count > maximumFileCount) 48throw new InvalidOperationException($"The maximum number of files accepted is {maximumFileCount}, but {_files.Count} were supplied.");
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\InputBaseTest.cs (2)
454Assert.Equal(1, component.AdditionalAttributes.Count); 489Assert.Equal(1, component.AdditionalAttributes.Count);
Microsoft.AspNetCore.Components.WebAssembly (2)
HotReload\HotReloadAgent.cs (1)
190for (var i = 0; i < deltas.Count; i++)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
64if (state is not null && state.Count > 0)
Microsoft.AspNetCore.DataProtection.Tests (3)
KeyManagement\XmlKeyManagerTests.cs (1)
331Assert.Equal(0, keys.Count);
Repositories\FileSystemXmlRepositoryTests.cs (1)
58Assert.Equal(0, allElements.Count);
Repositories\RegistryXmlRepositoryTests.cs (1)
45Assert.Equal(0, allElements.Count);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
32Assert.Equal(1, endpoint.RoutePattern.Parameters.Count);
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
396var metadataCount = formOptionsMetadatas.Count;
Microsoft.AspNetCore.Http.Connections.Tests (10)
MapConnectionHandlerTests.cs (10)
53Assert.Equal(2, policies.Count); 55Assert.Equal(1, policies[1].Requirements.Count); 63Assert.Equal(2, policies.Count); 65Assert.Equal(1, policies[1].Requirements.Count); 143Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 148Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 174Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 179Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 233Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 238Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count);
Microsoft.AspNetCore.Http.Extensions (4)
src\Components\Endpoints\src\FormMapping\Converters\FileConverter.cs (1)
67if (formFileCollection.Count == 0)
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (3)
178return _readOnlyMemoryKeys.Count > 0; 183_prefixResolver = new PrefixResolver(_readOnlyMemoryKeys.Keys, _readOnlyMemoryKeys.Count); 324$"Key count = {_readOnlyMemoryKeys.Count}, Prefix = {_currentPrefixBuffer}, Error count = {_errorCount}, Current depth = {_currentDepth}";
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
RequestDelegateGeneratorSuppressor.cs (1)
45var location = diagnostic.AdditionalLocations.Count > 0
Microsoft.AspNetCore.Http.Results (5)
ChallengeHttpResult.cs (1)
80if (AuthenticationSchemes != null && AuthenticationSchemes.Count > 0)
ForbidHttpResult.cs (2)
91if (AuthenticationSchemes != null && AuthenticationSchemes.Count > 0) 93for (var i = 0; i < AuthenticationSchemes.Count; i++)
SignOutHttpResult.cs (2)
80if (AuthenticationSchemes.Count == 0) 86for (var i = 0; i < AuthenticationSchemes.Count; i++)
Microsoft.AspNetCore.Http.Tests (7)
Features\FormFeatureTests.cs (7)
225Assert.Equal(0, formCollection.Files.Count); 262Assert.Equal(0, formCollection.Files.Count); 298Assert.Equal(1, formCollection.Files.Count); 347Assert.Equal(0, formCollection.Files.Count); 383Assert.Equal(1, formCollection.Files.Count); 432Assert.Equal(1, formCollection.Files.Count); 581Assert.Equal(1, formCollection.Files.Count);
Microsoft.AspNetCore.JsonPatch (1)
Internal\ObjectVisitor.cs (1)
55for (var i = 0; i < _path.Segments.Count - 1; i++)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
389for (var i = 0; i < providers.Count; i++)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
151Assert.Equal(3, descriptions.Count);
Microsoft.AspNetCore.Mvc.Core (60)
ActionConstraints\HttpMethodActionConstraint.cs (2)
63if (_httpMethods.Count == 0) 71for (var i = 0; i < _httpMethods.Count; i++)
ConsumesAttribute.cs (1)
210if (candidate.Constraints == null || candidate.Constraints.Count == 0 ||
Infrastructure\ActionSelector.cs (10)
70if (matches.Count > 0) 86if (finalMatches == null || finalMatches.Count == 0) 90else if (finalMatches.Count == 1) 115var actionsCount = actions.Count; 131var matchesCount = matches.Count; 154for (var i = 0; i < candidates.Count; i++) 159for (var j = 0; j < candidate.Constraints.Count; j++) 189for (var i = 0; i < candidates.Count; i++) 198for (var j = 0; j < candidate.Constraints.Count; j++) 233if (matches?.Count > 0)
Infrastructure\CopyOnWriteList.cs (1)
43public int Count => Readable.Count;
ModelBinding\Binders\ComplexObjectModelBinder.cs (9)
83var values = new object[boundConstructor.BoundConstructorParameters!.Count]; 231if (parameters.Count == 0) 237for (var i = 0; i < parameters.Count; i++) 292for (var i = 0; i < parameters.Count; i++) 327if (boundProperties.Count == 0) 333for (var i = 0; i < boundProperties.Count; i++) 384for (var i = 0; i < boundProperties.Count; i++) 548(!performsConstructorBinding || modelMetadata.BoundConstructor!.BoundConstructorParameters!.Count == 0)) 614for (var i = 0; i < parameters.Count; i++)
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
49var parameterBinders = boundConstructor.BoundConstructorParameters!.Count == 0 ? 51new IModelBinder[boundConstructor.BoundConstructorParameters.Count];
ModelBinding\FormFileValueProvider.cs (1)
44var count = formFiles.Count;
ModelBinding\FormFileValueProviderFactory.cs (1)
52if (form.Files.Count > 0)
ModelBinding\Validation\ClientValidatorCache.cs (2)
41var items = new List<ClientValidatorItem>(metadata.ValidatorMetadata.Count); 42for (var i = 0; i < metadata.ValidatorMetadata.Count; i++)
ModelBinding\Validation\CompositeClientModelValidatorProvider.cs (1)
37for (var i = 0; i < ValidatorProviders.Count; i++)
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (4)
66_count = _properties.Count + _parameters.Count; 84if (_index < _parameters.Count) 107var property = _properties[_index - _parameters.Count];
ModelBinding\Validation\ValidationVisitor.cs (1)
213var count = validators.Count;
ModelBinding\Validation\ValidatorCache.cs (2)
31var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count); 32for (var i = 0; i < metadata.ValidatorMetadata.Count; i++)
Routing\ActionConstraintMatcherPolicy.cs (8)
38for (var i = 0; i < endpoints.Count; i++) 90for (var i = 0; i < finalMatches.Count; i++) 121if (matches?.Count > 0) 165for (var i = 0; i < items.Count; i++) 171for (var j = 0; j < constraints.Count; j++) 200for (var i = 0; i < items.Count; i++) 210for (var j = 0; j < constraints.Count; j++) 258if (matches?.Count > 0)
Routing\ActionEndpointFactory.cs (6)
243for (var i = 0; i < groupConventions.Count; i++) 248for (var i = 0; i < conventions.Count; i++) 253for (var i = 0; i < route.Conventions.Count; i++) 347for (var i = 0; i < groupConventions.Count; i++) 446for (var i = 0; i < conventions.Count; i++) 451for (var i = 0; i < perRouteConventions.Count; i++)
Routing\ControllerActionEndpointDataSource.cs (1)
87for (var i = 0; i < actions.Count; i++)
Routing\DynamicControllerEndpointMatcherPolicy.cs (4)
40for (var i = 0; i < endpoints.Count; i++) 117if (endpoints.Count == 0 && dynamicControllerMetadata != null) 125else if (endpoints.Count == 0) 147if (endpoints.Count == 0)
Routing\EndpointRoutingUrlHelper.cs (1)
89private string DebuggerToString() => $"Endpoints = {_endpointDataSource.Endpoints.Count}";
Routing\KnownRouteValueConstraint.cs (1)
99for (var i = 0; i < actionDescriptors.Items.Count; i++)
Routing\MvcRouteHandler.cs (1)
44if (candidates == null || candidates.Count == 0)
Routing\RoutePatternWriter.cs (1)
26for (var i = 0; i < segment.Parts.Count; i++)
Microsoft.AspNetCore.Mvc.Core.Test (6)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
444Assert.Equal(2, model.Attributes.Count); 466Assert.Equal(2, model.Attributes.Count);
Formatters\OutputFormatterTests.cs (1)
122Assert.Equal(2, contentTypes.Count);
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (1)
405Assert.Equal(2, context.ParameterAttributes.Count);
ModelBinding\Metadata\ModelAttributesTest.cs (2)
165Assert.Equal(3, attributes.Attributes.Count); 170Assert.Equal(2, attributes.PropertyAttributes.Count);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
304var contextAttributesCount = contextAttributes.Count;
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
DataAnnotationsModelValidatorProviderTest.cs (2)
162var items = new List<ValidatorItem>(metadata.ValidatorMetadata.Count); 163for (var i = 0; i < metadata.ValidatorMetadata.Count; i++)
Microsoft.AspNetCore.Mvc.Razor (4)
RazorView.cs (1)
163for (var i = 0; i < ViewStartPages.Count; i++)
RazorViewEngine.cs (1)
464var viewStarts = new IRazorPage[result.ViewStartEntries!.Count];
ViewLocationCacheKey.cs (2)
103(ViewLocationExpanderValues.Count != y.ViewLocationExpanderValues.Count))
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
ChecksumValidator.cs (1)
66for (var i = 0; i < checksums.Count; i++)
PageLoaderMatcherPolicy.cs (1)
42for (var i = 0; i < endpoints.Count; i++)
RuntimeViewCompiler.cs (3)
283var expirationTokens = new List<IChangeToken>(checksums.Count); 285for (var i = 0; i < checksums.Count; i++) 318if (cSharpDocument.Diagnostics.Count > 0)
Microsoft.AspNetCore.Mvc.RazorPages (7)
ApplicationModels\DefaultPageApplicationModelProvider.cs (1)
156for (var i = 0; i < pageModel.HandlerTypeAttributes.Count; i++)
Filters\PageViewDataAttributeFilter.cs (1)
36for (var i = 0; i < Properties.Count; i++)
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (4)
43for (var i = 0; i < endpoints.Count; i++) 116if (endpoints.Count == 0 && dynamicPageMetadata != null) 124else if (endpoints.Count == 0) 146if (endpoints.Count == 0)
Infrastructure\PageActionEndpointDataSource.cs (1)
54for (var i = 0; i < actions.Count; i++)
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (1)
131Assert.Equal(3, authorizeFilter.Policy.Requirements.Count);
Microsoft.AspNetCore.Mvc.TagHelpers (6)
GlobbingUrlBuilder.cs (2)
83var urls = new List<string>(1 + globbedUrls.Count) 88for (var i = 0; i < globbedUrls.Count; i++)
LinkTagHelper.cs (3)
319for (var i = 0; i < urls.Count; i++) 344if (fallbackHrefs.Count == 0) 436var fallbackHrefsCount = fallbackHrefs.Count;
ScriptTagHelper.cs (1)
308if (fallbackSrcs.Count > 0)
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
325if (context == null || context.CompileLibraries.Count == 0)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
DefaultValidationHtmlAttributeProvider.cs (2)
62if (validators.Count > 0) 70for (var i = 0; i < validators.Count; i++)
Filters\ControllerViewDataAttributeFilter.cs (1)
31for (var i = 0; i < Properties.Count; i++)
Filters\SaveTempDataPropertyFilterBase.cs (2)
46for (var i = 0; i < Properties.Count; i++) 72for (var i = 0; i < Properties.Count; i++)
ViewComponents\DefaultViewComponentHelper.cs (2)
96for (var i = 0; i < descriptors.Items.Count; i++) 117if (descriptor.Parameters.Count == 1 && descriptor.Parameters[0].ParameterType.IsAssignableFrom(arguments.GetType()))
ViewEngines\CompositeViewEngine.cs (4)
33if (ViewEngines.Count == 0) 44for (var i = 0; i < ViewEngines.Count; i++) 82if (ViewEngines.Count == 0) 93for (var i = 0; i < ViewEngines.Count; i++)
Microsoft.AspNetCore.OpenApi (2)
Extensions\ApiDescriptionExtensions.cs (1)
52for (var i = 0; i < routePattern.PathSegments.Count; i++)
Services\OpenApiGenerator.cs (1)
331if (metadataList.Count > 0)
Microsoft.AspNetCore.Routing (124)
DecisionTree\DecisionTreeBuilder.cs (1)
75var itemCount = items.Count;
DefaultLinkGenerator.cs (1)
442if (values == null || values.Count == 0)
DefaultLinkParser.cs (1)
96for (var i = 0; i < kvp.Value.Count; i++)
EndpointDataSource.cs (4)
39var wrappedEndpoints = new RouteEndpoint[endpoints.Count]; 41for (int i = 0; i < endpoints.Count; i++) 91if (endpoints is null || endpoints.Count == 0) 113if (routeValues.Count > 0)
EndpointNameAddressScheme.cs (1)
39for (var i = 0; i < endpoints.Count; i++)
HostAttribute.cs (1)
54var hostsDisplay = (Hosts.Count == 0)
Internal\DfaGraphWriter.cs (1)
45for (var i = 0; i < endpoints.Count; i++)
Matching\AcceptsMatcherPolicy.cs (14)
44return endpoints.Any(e => e.Metadata.GetMetadata<IAcceptsMetadata>()?.ContentTypes.Count > 0); 62if (metadata == null || metadata.ContentTypes?.Count == 0) 79for (var j = 0; j < metadata.ContentTypes?.Count; j++) 96for (var j = 0; j < metadata.ContentTypes?.Count; j++) 151for (var i = 0; i < endpoints.Count; i++) 155if (contentTypes == null || contentTypes.Count == 0) 160for (var j = 0; j < contentTypes.Count; j++) 173for (var i = 0; i < endpoints.Count; i++) 177if (contentTypes.Count == 0) 197for (var j = 0; j < contentTypes.Count; j++) 266var ordered = new (ReadOnlyMediaTypeHeaderValue mediaType, int destination)[edges.Count]; 267for (var i = 0; i < edges.Count; i++) 338x?.ContentTypes.Count > 0 ? x : null, 339y?.ContentTypes.Count > 0 ? y : null);
Matching\CandidateSet.cs (3)
229switch (endpoints.Count) 246var candidates = new CandidateState[original.Length - 1 + endpoints.Count]; 305Candidates[i + endpoints.Count - 1] = new CandidateState(original[i].Endpoint, original[i].Values, original[i].Score + scoreOffset);
Matching\DataSourceDependentMatcher.cs (1)
42for (var i = 0; i < endpoints.Count; i++)
Matching\DfaMatcherBuilder.cs (18)
84maxDepth = Math.Max(maxDepth, endpoint.RoutePattern.PathSegments.Count); 383for (var i = 0; i < segment.Parts.Count; i++) 396Debug.Assert(i == segment.Parts.Count - 1 && partParameter.IsOptional); 402for (var j = 0; j < parameterPolicyReferences.Count; j++) 433for (var i = 0; i < parameterPolicyReferences.Count; i++) 477for (var k = 0; k < parameterPolicyReferences.Count; k++) 513if (depth < endpoint.RoutePattern.PathSegments.Count) 518if (endpoint.RoutePattern.PathSegments.Count == 0) 523var lastSegment = endpoint.RoutePattern.PathSegments[endpoint.RoutePattern.PathSegments.Count - 1]; 707if (endpoints == null || endpoints.Count == 0) 712var candiates = new Candidate[endpoints.Count]; 718for (var i = 1; i < endpoints.Count; i++) 753for (var i = 0; i < routeEndpoint.RoutePattern.PathSegments.Count; i++) 800for (var i = 0; i < routeEndpoint.RoutePattern.PathSegments.Count; i++) 815for (var i = 0; i < parameterPolicyReferences.Count; i++) 850for (var i = depth; i < endpoint.RoutePattern.PathSegments.Count; i++) 922for (var k = 0; k < edges.Count; k++) 932if (edge.Endpoints.Count > 0)
Matching\HostMatcherPolicy.cs (9)
51if (hosts == null || hosts.Count == 0) 84if (hosts == null || hosts.Count == 0) 92for (var j = 0; j < hosts.Count; j++) 199for (var i = 0; i < endpoints.Count; i++) 220for (var i = 0; i < endpoints.Count; i++) 293var ordered = new (EdgeKey host, int destination)[edges.Count]; 294for (var i = 0; i < edges.Count; i++) 360x?.Hosts.Count > 0 ? x : null, 361y?.Hosts.Count > 0 ? y : null);
Matching\HttpMethodMatcherPolicy.cs (13)
61for (var i = 0; i < endpoints.Count; i++) 63if (endpoints[i].Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Count > 0) 100if (metadata == null || metadata.HttpMethods.Count == 0) 128for (var j = 0; j < metadata.HttpMethods.Count; j++) 176for (var i = 0; i < endpoints.Count; i++) 184if (httpMethods.Count == 0) 189for (var j = 0; j < httpMethods.Count; j++) 226for (var i = 0; i < endpoints.Count; i++) 231if (httpMethods.Count == 0) 246for (var j = 0; j < httpMethods.Count; j++) 317for (var i = 0; i < edges.Count; i++) 436x?.HttpMethods.Count > 0 ? x : null, 437y?.HttpMethods.Count > 0 ? y : null);
Matching\MatcherPolicy.cs (1)
51for (var i = 0; i < endpoints.Count; i++)
Matching\NegotiationMatcherPolicy.cs (5)
32for (var i = 0; i < endpoints.Count; i++) 235for (var i = 0; i < endpoints.Count; i++) 247for (var i = 0; i < endpoints.Count; i++) 324var destinations = new (string negotiationValue, double quality, int destination)[edges.Count]; 325for (var i = 0; i < edges.Count; i++)
Patterns\DefaultRoutePatternTransformer.cs (2)
201for (var i = 0; i < policies.Count; i++) 223for (var j = 0; j < segment.Parts.Count; j++)
Patterns\RoutePattern.cs (1)
144var parametersCount = parameters.Count;
Patterns\RoutePatternFactory.cs (12)
476for (var j = 0; j < segment.Parts.Count; j++) 546for (var i = 0; i < segment.Parts.Count; i++) 610parameter.ParameterPolicies.Count > 0) 617parameterConstraints = new List<RoutePatternParameterPolicyReference>(parameter.ParameterPolicies.Count); 621if (parameter.ParameterPolicies.Count > 0) 627&& parameter.ParameterPolicies.Count == 0 1041if (leftDictionary.Count is 0) 1045if (rightDictionary.Count is 0) 1050var combinedDictionary = new Dictionary<string, TValue>(leftDictionary.Count + rightDictionary.Count, StringComparer.OrdinalIgnoreCase); 1107var leftCount = leftList.Count; 1113var rightCount = rightList.Count;
Patterns\RoutePatternMatcher.cs (9)
33_hasDefaultValue = new bool[RoutePattern.PathSegments.Count]; 34_defaultValues = new object[RoutePattern.PathSegments.Count]; 36for (var i = 0; i < RoutePattern.PathSegments.Count; i++) 86var pathSegment = i >= RoutePattern.PathSegments.Count ? null : RoutePattern.PathSegments[i]; 106for (; i < RoutePattern.PathSegments.Count; i++) 163for (; i < RoutePattern.PathSegments.Count; i++) 291var indexOfLastSegment = routeSegment.Parts.Count - 1; 339Debug.Assert(routeSegment.Parts.Count > 1); 402if (indexOfLastSegmentUsed == (routeSegment.Parts.Count - 1))
Patterns\RoutePatternParser.cs (2)
322for (var j = 0; j < segment.Parts.Count; j++) 327(i != segments.Count - 1 || j != segment.Parts.Count - 1))
Patterns\RoutePatternPathSegment.cs (1)
35public bool IsSimple => Parts.Count == 1;
RouteValuesAddressScheme.cs (3)
92for (var i = 0; i < endpoints.Count; i++) 101if (metadata == null && routeEndpoint.RoutePattern.RequiredValues.Count == 0) 118if (routeEndpoint.RoutePattern.RequiredValues.Count > 0)
Template\DefaultTemplateBinderFactory.cs (1)
49for (var i = 0; i < kvp.Value.Count; i++)
Template\RoutePrecedence.cs (8)
60ValidateSegementLength(routePattern.PathSegments.Count); 64for (var i = 0; i < routePattern.PathSegments.Count; i++) 114ValidateSegementLength(routePattern.PathSegments.Count); 120for (var i = 0; i < routePattern.PathSegments.Count; i++) 179if (pathSegment.Parts.Count > 1) 194if (parameterPart.ParameterPolicies.Count > 0) 251if (pathSegment.Parts.Count > 1) 276if (parameterPart.ParameterPolicies.Count > 0)
Template\RouteTemplate.cs (1)
32Segments = new List<TemplateSegment>(other.PathSegments.Count);
Template\TemplateBinder.cs (8)
84for (var i = 0; i < pattern.Parameters.Count; i++) 116for (var i = 0; i < pattern.Parameters.Count; i++) 254var parameterCount = _pattern.Parameters.Count; 515var segmentsCount = segments.Count; 523var partsCount = parts.Count; 722var slots = new KeyValuePair<string, object?>[pattern.Parameters.Count + filters.Length]; 724for (var i = 0; i < pattern.Parameters.Count; i++) 731slots[i + pattern.Parameters.Count] = new KeyValuePair<string, object?>(filters[i].Key, null);
Template\TemplateSegment.cs (1)
32var partCount = other.Parts.Count;
Tree\LinkGenerationDecisionTree.cs (1)
39for (var i = 0; i < entries.Count; i++)
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
53for (var i = 0; i < withoutDefaults.Parameters.Count; i++)
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
57for (var i = 0; i < endpoint.RoutePattern.Parameters.Count; i++)
Microsoft.AspNetCore.Routing.Tests (22)
DefaultEndpointDataSourceTests.cs (2)
39Assert.Equal(2, dataSource.Endpoints.Count); 83Assert.Equal(2, dataSource.Endpoints.Count);
Matching\RouteMatcherBuilder.cs (1)
53for (var i = 0; i < withoutDefaults.Parameters.Count; i++)
Matching\TreeRouterMatcherBuilder.cs (1)
57for (var i = 0; i < endpoint.RoutePattern.Parameters.Count; i++)
Patterns\RoutePatternFactoryTest.cs (8)
424Assert.Equal(3, actual.Parameters.Count); 453Assert.Equal(3, actual.Parameters.Count); 483Assert.Equal(3, actual.Parameters.Count); 523Assert.Equal(3, actual.Parameters.Count); 642Assert.Equal(3, parameterPart.ParameterPolicies.Count); 669Assert.Equal(3, parameterPart.ParameterPolicies.Count); 690Assert.Equal(3, actual.Parts.Count); 711Assert.Equal(3, actual.Parts.Count);
Patterns\RoutePatternParserTest.cs (9)
659if (x.PathSegments.Count != y.PathSegments.Count) 664for (var i = 0; i < x.PathSegments.Count; i++) 666if (x.PathSegments[i].Parts.Count != y.PathSegments[i].Parts.Count) 671for (int j = 0; j < x.PathSegments[i].Parts.Count; j++) 680if (x.Parameters.Count != y.Parameters.Count) 685for (var i = 0; i < x.Parameters.Count; i++)
Template\TemplateSegmentTest.cs (1)
36Assert.Equal(4, routePatternPathSegment.Parts.Count);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
206Assert.True(requestInfoFeature.RequestInfo.Count > 0);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (2)
RequestHeaderBenchmarks.cs (2)
92requestStructure.Headers.UnknownHeaderCount += (ushort)headerNames.Count; 95var dataDestination = unknownHeaderStructureDestination[(unknownHeadersSize * headerNames.Count)..];
Microsoft.AspNetCore.Server.HttpSys.Tests (4)
RequestHeaderTests.cs (4)
407requestStructure.Headers.UnknownHeaderCount += (ushort)headerNames.Count; 410var dataDestination = unknownHeaderStructureDestination.Slice(unknownHeadersSize * headerNames.Count); 447requestStructure.Headers.UnknownHeaderCount += (ushort)headerNames.Count; 450var dataDestination = unknownHeaderStructureDestination.Slice(unknownHeadersSize * headerNames.Count);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
InMemoryTransportBenchmark.cs (1)
148if (_acceptedConnections < _connections.Count)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Internal\SerializedHubMessage.cs (1)
35for (var i = 0; i < messages.Count; i++)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HttpConnectionTests.Negotiate.cs (3)
304Assert.Equal(5, testHttpHandler.ReceivedRequests.Count); 411Assert.Equal(5, testHttpHandler.ReceivedRequests.Count); 473Assert.Equal(5, testHttpHandler.ReceivedRequests.Count);
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (1)
652arguments = new object?[descriptor.OriginalParameterTypes!.Count];
SerializedHubMessage.cs (1)
30for (var i = 0; i < messages.Count; i++)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
839var paramCount = paramTypes.Count;
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Protocol\MessagePackHubProtocolWorker.cs (2)
300if (parameterTypes.Count != argumentCount) 303$"Invocation provides {argumentCount} argument(s) but target expects {parameterTypes.Count}.");
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (3)
Protocol\NewtonsoftJsonHubProtocol.cs (3)
807if (paramIndex < paramTypes.Count) 822var paramCount = paramTypes.Count; 897var paramCount = paramTypes.Count;
Microsoft.AspNetCore.SignalR.StackExchangeRedis (7)
Internal\RedisProtocol.cs (3)
59if (excludedConnectionIds != null && excludedConnectionIds.Count > 0) 61writer.WriteArrayHeader(excludedConnectionIds.Count); 237writer.WriteMapHeader(serializedHubMessages.Count);
RedisHubLifetimeManager.cs (4)
245var publishTasks = new List<Task>(connectionIds.Count); 260var publishTasks = new List<Task>(groupNames.Count); 277if (userIds.Count > 0) 280var publishTasks = new List<Task>(userIds.Count);
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
DefaultHubMessageSerializerTests.cs (2)
30Assert.Equal(testData.SerializedCount, serializedHubMessage.Count); 49Assert.Equal(1, serializedHubMessage.Count);
Microsoft.AspNetCore.SignalR.Tests (18)
HubConnectionHandlerTests.cs (1)
2311Assert.Equal(2, resource.HubMethodArguments?.Count);
Internal\DefaultHubProtocolResolverTests.cs (1)
98Assert.Equal(1, hubProtocols.Count);
MapSignalRTests.cs (16)
90Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 95Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 123Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 125Assert.Equal(2, policies.Count); 127Assert.Equal(1, policies[1].Requirements.Count); 133Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 135Assert.Equal(2, policies.Count); 137Assert.Equal(1, policies[1].Requirements.Count); 162Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 167Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 191Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 196Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 220Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 225Assert.Equal(1, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 252Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 257Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
1875Assert.Equal(3, ds.Endpoints.Count); 1935Assert.Equal(1, ds.Endpoints.Count);
Microsoft.Build (49)
BackEnd\BuildManager\BuildManager.cs (2)
2013var finishedNodes = new HashSet<ProjectGraphNode>(projectGraph.ProjectNodes.Count); 2015var resultsPerNode = new Dictionary<ProjectGraphNode, BuildResult>(projectGraph.ProjectNodes.Count);
BackEnd\Components\ProjectCache\ProjectCacheDescriptorEqualityComparer.cs (1)
49if (obj.PluginSettings.Count > 0)
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (2)
57if (potentialResolvers.Count == 0) 86MSBuildEventSource.Log.SdkResolverFindResolversManifestsStop(allResolversManifests?.Count ?? 0);
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
542if (defaultResolvers.Count > 0) 579ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_4) ? _specificResolversManifestsRegistry.Count + _generalResolversManifestsRegistry.Count : _resolversList.Count));
BackEnd\Shared\BuildResult.cs (1)
524targetsToKeep.Count > 0,
BuildCheck\Infrastructure\BuildAnalyzerWrapper.cs (1)
42if (userConfigs.Count == 1)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
239analyzer.SupportedRules.Count != analyzerFactoryContext.RuleIds.Length
BuildCheck\Infrastructure\ConfigurationProvider.cs (2)
134TConfig[] configurations = new TConfig[ruleIds.Count]; 135for (int i = 0; i < ruleIds.Count; i++)
CollectionHelpers.cs (2)
60if (a.Count != b.Count)
Construction\Solution\SolutionFile.cs (3)
273return project.ProjectType != SolutionProjectType.SolutionFolder && project.ProjectConfigurations.Count > 0; 1559if ((_defaultConfigurationName.Length == 0) && (SolutionConfigurations.Count > 0)) 1597if ((_defaultPlatformName.Length == 0) && (SolutionConfigurations.Count > 0))
Construction\Solution\SolutionProjectGenerator.cs (3)
733var projectsInOrder = new List<ProjectInSolution>(_solutionFile.ProjectsInOrder.Count); 2320if ((!solutionHasReleaseConfiguration) && (_solutionFile.SolutionConfigurations.Count > 0)) 2345if (_solutionFile.SolutionConfigurations.Count > 0)
ErrorUtilities.cs (2)
504if (parameter.Count == 0) 515if (parameter?.Count == 0)
Evaluation\Profiler\ProfilerResultPrettyPrinter.cs (1)
44if (profiledLocations.Count == 0)
FileMatcher.cs (3)
507if (0 == entries.Count) 519ErrorUtilities.VerifyThrow(entries.Count == 1, 521parts[i], longPath, path, entries.Count);
Graph\GraphBuilder.cs (9)
105var graphRoots = new List<ProjectGraphNode>(entryPointNodes.Count); 109if (entryPointNode.ReferencingProjects.Count == 0) 128if (_solutionDependencies != null && _solutionDependencies.Count != 0) 249if (entryPoints.Count == 0 || !entryPoints.Any(e => FileUtilities.IsSolutionFilename(e.ProjectFile))) 254if (entryPoints.Count != 1) 262ErrorUtilities.VerifyThrowArgument(entryPoints.Count == 1, "StaticGraphAcceptsSingleSolutionEntryPoint"); 311List<ProjectGraphEntryPoint> newEntryPoints = new(projectsInSolution.Count); 339if (project.Dependencies.Count > 0) 343List<string> solutionDependenciesForProject = new(project.Dependencies.Count);
Graph\ProjectGraph.cs (9)
486ProjectNodes.Count, 556return $"#roots={GraphRoots.Count}, #nodes={ProjectNodes.Count}, #entryPoints={EntryPointNodes.Count}"; 563var toposort = new List<ProjectGraphNode>(graphNodes.Count); 564var partialRoots = new Queue<ProjectGraphNode>(graphNodes.Count); 565var inDegree = graphNodes.ToDictionary(n => n, n => n.ReferencingProjects.Count); 587ErrorUtilities.VerifyThrow(toposort.Count == graphNodes.Count, "sorted node count must be equal to total node count"); 717if (node.ProjectReferences.Count == 0)
Graph\ProjectGraphNode.cs (2)
56$"{truncatedProjectFile}, #GlobalProps={ProjectInstance.GlobalProperties.Count}, #Props={ProjectInstance.Properties.Count}, #Items={ProjectInstance.Items.Count}, #in={ReferencingProjects.Count}, #out={ProjectReferences.Count}";
Graph\ProjectInterpretation.cs (1)
256if (outerBuild.ProjectType == ProjectType.OuterBuild && outerBuild.ReferencingProjects.Count != 0)
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
329Write(result.Value.ProfiledLocations.Count);
LogMessagePacketBase.cs (1)
1038var count = value.ProfiledLocations.Count;
Microsoft.Build.BuildCheck.UnitTests (2)
TaskInvocationAnalysisDataTests.cs (2)
112data.Parameters.Count.ShouldBe(1); 132data.Parameters.Count.ShouldBe(3);
Microsoft.Build.Engine.OM.UnitTests (11)
Construction\SolutionFile_Tests.cs (9)
323Assert.Equal(3, solution.ProjectsInOrder.Count); 397Assert.Equal(5, solution.ProjectsInOrder.Count); 475Assert.Equal(4, solution.ProjectsInOrder.Count); 608Assert.Equal(3, solution.ProjectsInOrder.Count); 618Assert.Equal(2, solution.ProjectsInOrder[1].Dependencies.Count); 685Assert.Equal(7, solution.SolutionConfigurations.Count); 745Assert.Equal(6, solution.SolutionConfigurations.Count); 899Assert.Equal(6, csharpProject.ProjectConfigurations.Count); 919Assert.Equal(6, vcProject.ProjectConfigurations.Count);
ErrorUtilities.cs (2)
504if (parameter.Count == 0) 515if (parameter?.Count == 0)
Microsoft.Build.Engine.UnitTests (155)
BackEnd\BuildManager_Tests.cs (2)
4137graph.ProjectNodes.Count.ShouldBe(2); 4222graph.ProjectNodes.Count.ShouldBe(2);
BackEnd\SdkResolverLoader_Tests.cs (5)
80files.Count.ShouldBe(1); 112resolversFound.Count.ShouldBe(1); 235resolversFound.Count.ShouldBe(1); 261resolversManifestsFound.Count.ShouldBe(1); 350resolvers.Count.ShouldBe(0);
Construction\SolutionFile_Tests.cs (11)
907solution.ProjectsInOrder.Count.ShouldBe(4); 995solution.ProjectsInOrder.Count.ShouldBe(5); 1312solution.ProjectsInOrder.Count.ShouldBe(6); 1392solution.ProjectsInOrder.Count.ShouldBe(3); 1403solution.ProjectsInOrder[1].Dependencies.Count.ShouldBe(2); 1473solution.ProjectsInOrder[0].Dependencies.Count.ShouldBe(2); 1550solution.ProjectsInOrder.Count.ShouldBe(3); 1619solution.SolutionConfigurations.Count.ShouldBe(7); 1679solution.SolutionConfigurations.Count.ShouldBe(6); 1888csProject.ProjectConfigurations.Count.ShouldBe(6); 1908vcProject.ProjectConfigurations.Count.ShouldBe(6);
Graph\GetCompatiblePlatformGraph_Tests.cs (1)
184graph.ProjectNodes.Count.ShouldBe(3);
Graph\GraphLoadedFromSolution_tests.cs (6)
599edges.Count.ShouldBe(1); 622edges.Count.ShouldBe(10); 625node1.ProjectReferences.Count.ShouldBe(3); 630outerBuild3.ProjectReferences.Count.ShouldBe(3); 711graph.ProjectNodes.Count.ShouldBe(graph.ProjectNodes.Select(GetProjectPath).Distinct().Count()); 717if (projectConfigurations == null || graphFromSolution.ProjectNodes.All(n => n.ProjectReferences.Count == 0))
Graph\GraphTestingUtilities.cs (1)
50outerBuild.ProjectReferences.Count.ShouldBe(expectedInnerBuildCount);
Graph\ProjectGraph_Tests.cs (122)
66projectGraph.ProjectNodes.Count.ShouldBe(1); 117projectGraph.ProjectNodes.Count.ShouldBe(1); 232graph.ProjectNodes.Count.ShouldBe(3); 233GetFirstNodeWithProjectNumber(graph, 1).ProjectReferences.Count.ShouldBe(2); 234GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.Count.ShouldBe(0); 235GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.Count.ShouldBe(0); 261graph.ProjectNodes.Count.ShouldBe(7); 270node1.ProjectReferences.Count.ShouldBe(2); 271node2.ProjectReferences.Count.ShouldBe(3); 272node3.ProjectReferences.Count.ShouldBe(0); 273node4.ProjectReferences.Count.ShouldBe(0); 274node5.ProjectReferences.Count.ShouldBe(1); 275node6.ProjectReferences.Count.ShouldBe(1); 276node7.ProjectReferences.Count.ShouldBe(0); 278node1.ReferencingProjects.Count.ShouldBe(1); 279node2.ReferencingProjects.Count.ShouldBe(0); 280node3.ReferencingProjects.Count.ShouldBe(1); 281node4.ReferencingProjects.Count.ShouldBe(1); 282node5.ReferencingProjects.Count.ShouldBe(2); 283node6.ReferencingProjects.Count.ShouldBe(1); 284node7.ReferencingProjects.Count.ShouldBe(1); 406graph.ProjectNodes.Count.ShouldBe(5); 431graph.ProjectNodes.Count.ShouldBe(3); 464graph.ProjectNodes.Count.ShouldBe(6); 470node4A.ProjectReferences.Count.ShouldBe(1); 471node4B.ProjectReferences.Count.ShouldBe(1); 500graph.ProjectNodes.Count.ShouldBe(4); 535graph.ProjectNodes.Count.ShouldBe(6); 579projectGraph.ProjectNodes.Count.ShouldBe(3); 584node1.ProjectReferences.Count.ShouldBe(1); 586node2.ProjectReferences.Count.ShouldBe(1); 602projectGraph.ProjectNodes.Count.ShouldBe(4); 604projectGraph.EntryPointNodes.Count.ShouldBe(2); 616entryPointNode1.ProjectReferences.Count.ShouldBe(1); 617entryPointNode2.ProjectReferences.Count.ShouldBe(1); 641projectGraph.ProjectNodes.Count.ShouldBe(3); 643projectGraph.EntryPointNodes.Count.ShouldBe(2); 655entryPointNode1.ProjectReferences.Count.ShouldBe(1); 656entryPointNode2.ProjectReferences.Count.ShouldBe(1); 674projectGraph.EntryPointNodes.Count.ShouldBe(3); 675projectGraph.GraphRoots.Count.ShouldBe(2); 862projectGraph.EntryPointNodes.Count.ShouldBe(5); 864projectGraph.GraphRoots.Count.ShouldBe(2); 866projectGraph.ProjectNodes.Count.ShouldBe(7); 871project1Node.ProjectReferences.Count.ShouldBe(3); 877project2Node.ProjectReferences.Count.ShouldBe(1); 883project3Node.ProjectReferences.Count.ShouldBe(1); 890project4Node.ProjectReferences.Count.ShouldBe(0); 896project5Node.ProjectReferences.Count.ShouldBe(0); 902project6Node.ProjectReferences.Count.ShouldBe(0); 910project8Node.ProjectReferences.Count.ShouldBe(0); 925projectGraph.ProjectNodes.Count.ShouldBe(4); 928targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 953projectGraph.ProjectNodes.Count.ShouldBe(3); 956targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 984projectGraph.ProjectNodes.Count.ShouldBe(6); 987targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1006projectGraph.ProjectNodes.Count.ShouldBe(2); 1009targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1024projectGraph.ProjectNodes.Count.ShouldBe(2); 1027targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1047projectGraph.ProjectNodes.Count.ShouldBe(2); 1050targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1070projectGraph.ProjectNodes.Count.ShouldBe(2); 1073targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1087projectGraph.ProjectNodes.Count.ShouldBe(1); 1113projectGraph.ProjectNodes.Count.ShouldBe(2); 1116targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1154projectGraph.ProjectNodes.Count.ShouldBe(2); 1157targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1188projectGraph.ProjectNodes.Count.ShouldBe(4); 1192targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1360projectGraph.ProjectNodes.Count.ShouldBe(12); 1364targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1395projectGraph.ProjectNodes.Count.ShouldBe(2); 1398targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1418projectGraph.ProjectNodes.Count.ShouldBe(2); 1421targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1448projectGraph.ProjectNodes.Count.ShouldBe(7); 1451targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count); 1505projectGraph.ProjectNodes.Count.ShouldBe(expected: 5); 1508targetLists.Count.ShouldBe(expected: projectGraph.ProjectNodes.Count); 1815toposort.Length.ShouldBe(projectGraph.ProjectNodes.Count); 1876Regex.Matches(dot, "label").Count.ShouldBe(graph.ProjectNodes.Count); 1888graph.ProjectNodes.Count.ShouldBe(3); 1915graph.ProjectNodes.Count.ShouldBe(4); 1949graph.ProjectNodes.Count.ShouldBe(4); 1982graph.ProjectNodes.Count.ShouldBe(4); 2001graph.ProjectNodes.Count.ShouldBe(4); 2029graph.ProjectNodes.Count.ShouldBe(2); 2048graph.ProjectNodes.Count.ShouldBe(2); 2069graph.ProjectNodes.Count.ShouldBe(8); 2096graph.ProjectNodes.Count.ShouldBe(11); 2107innerBuildWithCommonReferences.ProjectReferences.Count.ShouldBe(4); 2113innerBuildWithAdditionalReferences.ProjectReferences.Count.ShouldBe(8); 2136graph.ProjectNodes.Count.ShouldBe(4); 2170graph.ProjectNodes.Count.ShouldBe(3); 2214graph.ProjectNodes.Count.ShouldBe(5); 2538innerBuilds1.Count.ShouldBe(2); 2550innerBuilds4.Count.ShouldBe(2); 2625innerBuildsFor1.Count.ShouldBe(2); 2638innerBuildsFor2.Count.ShouldBe(2); 2648outerBuild3.ReferencingProjects.Count.ShouldBe(4); 2652innerBuildsFor3.Count.ShouldBe(2); 2656inner3.ReferencingProjects.Count.ShouldBe(5); 2878targetLists.Count.ShouldBe(projectGraph.ProjectNodes.Count);
Graph\ResultCacheBasedBuilds_Tests.cs (1)
437var results = new Dictionary<string, (BuildResult Result, MockLogger Logger)>(topoSortedNodes.Count);
ProjectCache\ProjectCacheTests.cs (4)
782instanceMockCache.Requests.Count.ShouldBe(graph.ProjectNodes.Count); 788Regex.Matches(mockLogger.FullLog, $"{AssemblyMockCache}: GetCacheResultAsync for").Count.ShouldBe(graph.ProjectNodes.Count); 1500StringShouldContainSubstring(logger.FullLog, $"{AssemblyMockCache}: GetCacheResultAsync for", graph.ProjectNodes.Count); 1543cache.QueryStartStops.Count.ShouldBe(graph.ProjectNodes.Count * 2);
SolutionFileBuilder.cs (2)
156if (project.Dependencies.Count > 0 || project.DependencyGuids.Count > 0)
Microsoft.Build.Framework (3)
FileClassifier.cs (1)
220for (int i = 0; i < immutableDirectories.Count; i++)
Profiler\ProfilerResult.cs (2)
37(ProfiledLocations.Count == result.ProfiledLocations.Count &&
Microsoft.Build.Tasks.Core (9)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2716var combined = new List<DependentAssembly>(first.Count + second.Count);
ErrorUtilities.cs (2)
504if (parameter.Count == 0) 515if (parameter?.Count == 0)
FileMatcher.cs (3)
507if (0 == entries.Count) 519ErrorUtilities.VerifyThrow(entries.Count == 1, 521parts[i], longPath, path, entries.Count);
WriteCodeFragment.cs (2)
397for (int i = 0; i < parameters.Count; i++) 480.Where(t => t.Length == positionalParameters.Count)
Microsoft.Build.Tasks.UnitTests (1)
ResourceHandling\MSBuildResXReader_Tests.cs (1)
105resxWithTwoStrings.Count.ShouldBe(2);
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
1295a.Count.ShouldBe(b.Count);
Microsoft.Build.Utilities.Core (5)
ErrorUtilities.cs (2)
504if (parameter.Count == 0) 515if (parameter?.Count == 0)
FileMatcher.cs (3)
507if (0 == entries.Count) 519ErrorUtilities.VerifyThrow(entries.Count == 1, 521parts[i], longPath, path, entries.Count);
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateResxSource.cs (1)
523public bool HasArguments => _arguments.Count > 0;
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
377if (exceptions.Count == 1) 382if (exceptions.Count > 1)
Microsoft.Extensions.DependencyModel (4)
DependencyContextWriter.cs (4)
135int count = libraries.Count; 198if (dependencies.Count == 0) 213int count = resourceAssemblies.Count; 322if (group.RuntimeFiles.Count != 0)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
259if (entry.Data.Count > 0 && logger.IsEnabled(LogLevel.Debug))
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestDirectory.cs (2)
89var list = new List<ManifestEntry>(Children.Count); 90for (var i = 0; i < Children.Count; i++)
Microsoft.Extensions.Http (1)
HttpMessageHandlerBuilder.cs (1)
92for (int i = additionalHandlersList.Count - 1; i >= 0; i--)
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (2)
201var arguments = new KeyValuePair<string, string?>[keyValuePairs.Count]; 202for (int i = 0; i < keyValuePairs.Count; i++)
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Roslyn4.0.cs (1)
52if (logClasses.Count > 0)
Microsoft.Extensions.Options.SourceGeneration (1)
Generator.cs (1)
51if (validatorTypes.Count > 0)
Microsoft.Extensions.Primitives (3)
CompositeChangeToken.cs (3)
39for (int i = 0; i < ChangeTokens.Count; i++) 71for (int i = 0; i < ChangeTokens.Count; i++) 105for (int i = 0; i < ChangeTokens.Count; i++)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
75&& document.Folders.Count == 1
MinimalSample (1)
Program.cs (1)
37return $"{result} | /inner filter! Tags: {(tags.Count == 0 ? "(null)" : string.Join(", ", tags))}";
MSBuild (4)
CollectionHelpers.cs (2)
60if (a.Count != b.Count)
ErrorUtilities.cs (2)
504if (parameter.Count == 0) 515if (parameter?.Count == 0)
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
38if (attributeList != null && attributeList.Count > 0)
PresentationFramework (25)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (6)
137EnsureIndexInt32(index, _list.Count); 150public uint Size => (uint)_list.Count; 155int max = _list.Count; 180if (startIndex == _list.Count) 183EnsureIndexInt32(startIndex, _list.Count); 190uint itemCount = Math.Min((uint)items.Length, (uint)_list.Count - startIndex);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
38if (attributeList != null && attributeList.Count > 0)
System\Windows\Documents\NLGSpellerInterop.cs (6)
234segmentCount += sentence.Segments.Count; 239for (int i = 0; continueIteration && (i < sentence.Segments.Count); i++ ) 727for (int i = 0; result && (i < SubSegments.Count); i++) 849Invariant.Assert(_segments.Count == sentenceSegmentCount); 879if (Segments.Count > 0) 881ITextRange textRange = Segments[Segments.Count - 1].TextRange;
System\Windows\Documents\Speller.cs (3)
917if (textSegment.SubSegments.Count == 0) 920if(textSegment.Suggestions.Count > 0) 973if (textSegment.SubSegments.Count == 0)
System\Windows\Documents\WinRTSpellerInterop.cs (5)
391segmentCount += sentence.Segments.Count; 395for (int i = 0; continueIteration && (i < sentence.Segments.Count); i++) 1025for (int i = 0; result && (i < SubSegments.Count); i++) 1082if (Segments.Count > 0) 1084ITextRange textRange = Segments[Segments.Count - 1].TextRange;
System\Windows\Documents\WinRTSpellerInteropExtensions.cs (4)
63if (tokens.Count == 0) 71for (int i = 0; i < tokens.Count; i++) 113if (tokens.Count > 0 && 115spellChecker.HasErrors(tokens[tokens.Count - 1].Text) &&
Sample (2)
Program.cs (2)
47forms.MapPost("/form-files", (IFormFileCollection files) => Results.Ok(files.Count)); 48forms.MapPost("/form-file-multiple", (IFormFile resume, IFormFileCollection files) => Results.Ok(files.Count + resume.FileName));
Swaggatherer (4)
Template.cs (4)
19for (var i = 0; i < entries.Count; i++) 45for (var i = 0; i < entries.Count; i++) 60for (var i = 0; i < entries.Count; i++) 135entries.Count);
System.Collections.Concurrent (1)
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
239IReadOnlyCollection<KeyValuePair<TKey, TValue>> rc => Math.Max(DefaultCapacity, rc.Count),
System.Collections.Immutable (18)
System\Collections\Frozen\EmptyFrozenSet.cs (1)
45other is IReadOnlyCollection<T> s ? s.Count == 0 : // TODO https://github.com/dotnet/runtime/issues/42254: Remove if/when Any includes this check
System\Collections\Frozen\FrozenSetInternalBase.cs (2)
92return _thisSet.Count <= otherAsSet.Count && IsSubsetOfSetWithCompatibleComparer(otherAsSet); 152return _thisSet.Count == otherAsSet.Count && ContainsAllElements(otherAsSet);
System\Collections\Immutable\IImmutableListQueries.cs (3)
270/// no larger element, the bitwise complement of <see cref="IReadOnlyCollection{T}.Count"/>. 292/// no larger element, the bitwise complement of <see cref="IReadOnlyCollection{T}.Count"/>. 317/// no larger element, the bitwise complement of <see cref="IReadOnlyCollection{T}.Count"/>.
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (1)
49count = readOnlyCollection.Count;
System\Collections\Immutable\ImmutableList.cs (10)
149return list.IndexOf(item, 0, list.Count, EqualityComparer<T>.Default); 170return list.IndexOf(item, 0, list.Count, equalityComparer); 195return list.IndexOf(item, startIndex, list.Count - startIndex, EqualityComparer<T>.Default); 243if (list.Count == 0) 249return list.LastIndexOf(item, list.Count - 1, list.Count, EqualityComparer<T>.Default); 270if (list.Count == 0) 276return list.LastIndexOf(item, list.Count - 1, list.Count, equalityComparer); 301if (list.Count == 0 && startIndex == 0)
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
55get { return _dictionary.Count; }
System.Linq.Expressions (41)
System\Dynamic\Utils\ExpressionUtils.cs (3)
256return current.Count == 0; 272return current.Count == 0; 289int count = current.Count;
System\Linq\Expressions\BlockExpression.cs (5)
471Debug.Assert(expressions.Count != 0); 481Debug.Assert(index >= 0 && index < _expressions.Count); 486internal override int ExpressionCount => _expressions.Count; 618internal override int ExpressionCount => _body.Count; 1090return expressions.Count switch
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
102Definitions = new Dictionary<ParameterExpression, VariableStorageKind>(variables.Count);
System\Linq\Expressions\DebugViewWriter.cs (1)
262if (open == '{' || expressions.Count > 1)
System\Linq\Expressions\DynamicExpression.cs (2)
507int IArgumentProvider.ArgumentCount => _arguments.Count; 854switch (argumentList.Count)
System\Linq\Expressions\Expression.cs (1)
242for (int i = 0, n = items.Count; i < n; i++)
System\Linq\Expressions\IndexExpression.cs (3)
31Debug.Assert(instance.Type.GetArrayRank() == arguments.Count); 110public int ArgumentCount => _arguments.Count; 123Debug.Assert(arguments == null || arguments.Length == _arguments.Count);
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
122for (int i = 0, n = instructions.Count; i < n; i++)
System\Linq\Expressions\InvocationExpression.cs (3)
142public override int ArgumentCount => _arguments.Count; 147Debug.Assert(arguments == null || arguments.Length == _arguments.Count); 715switch (argumentList.Count)
System\Linq\Expressions\LambdaExpression.cs (3)
311return parameters.Count switch 573internal override int ParameterCount => _parameters.Count; 585Debug.Assert(parameters == null || parameters.Length == _parameters.Count);
System\Linq\Expressions\MethodCallExpression.cs (17)
179public override int ArgumentCount => _arguments.Count; 192Debug.Assert(args == null || args.Count == _arguments.Count); 210public override int ArgumentCount => _arguments.Count; 223Debug.Assert(args == null || args.Count == _arguments.Count); 254Debug.Assert(args == null || args.Count == 0); 301Debug.Assert(args == null || args.Count == 1); 367Debug.Assert(args == null || args.Count == 2); 438Debug.Assert(args == null || args.Count == 3); 515Debug.Assert(args == null || args.Count == 4); 598Debug.Assert(args == null || args.Count == 5); 634Debug.Assert(args == null || args.Count == 0); 683Debug.Assert(args == null || args.Count == 1); 748Debug.Assert(args == null || args.Count == 2); 819Debug.Assert(args == null || args.Count == 3); 1193int argCount = argumentList.Count;
System\Linq\Expressions\NewExpression.cs (1)
61public int ArgumentCount => _arguments.Count;
System.Net.Http (2)
System\Net\Http\DiagnosticsHandler.cs (2)
34if (autoRedirect && _propagator.Fields is IReadOnlyCollection<string> fields && fields.Count > 0) 36var fieldDescriptors = new List<HeaderDescriptor>(fields.Count);
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (6)
63MemoryHandle[] handles = new MemoryHandle[buffers.Count]; 64Span<Interop.Sys.IOVector> vectors = buffers.Count <= IovStackThreshold ? stackalloc Interop.Sys.IOVector[IovStackThreshold] : new Interop.Sys.IOVector[buffers.Count]; 69int buffersCount = buffers.Count; 80result = Interop.Sys.PReadV(handle, pinnedVectors, buffers.Count, fileOffset); 163int buffersCount = buffers.Count;
System.Reflection.Metadata (8)
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (8)
71if (baseTableRowCounts.Count != MetadataTokens.TableCount) 81if (baseHeapSizes.Count != MetadataTokens.HeapCount) 87if (deltaReaders == null || deltaReaders.Count == 0) 92for (int i = 0; i < deltaReaders.Count; i++) 139int generationCount = 1 + deltaReaders.Count; 151for (int r = 0; r < deltaReaders.Count; r++) 171var rowCounts = GetBaseRowCounts(baseRowCounts, generations: 1 + deltaReaders.Count); 173for (int generation = 1; generation <= deltaReaders.Count; generation++)
System.Xaml (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
38if (attributeList != null && attributeList.Count > 0)
System\Xaml\XamlSchemaContext.cs (1)
578SpecialBracketCharacters splBracketCharacters = markupExtensionBracketCharactersList != null && markupExtensionBracketCharactersList.Count > 0
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
32if (logs.Count > 0)
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
32if (logs.Count > 0)
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
32if (logs.Count > 0)
Templates.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
32if (logs.Count > 0)
xunit.console (1)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (1)
64.Where(lib => lib.RuntimeAssemblyGroups?.Count > 0)