Implemented interface members:
75 references to Count
Microsoft.AspNetCore.Http.Abstractions (8)
Routing\RouteValueDictionary.cs (8)
449if (arrayIndex < 0 || arrayIndex > array.Length || array.Length - arrayIndex < Count) 454if (Count == 0) 459EnsureCapacity(Count); 486if (Count == 0) 493EnsureCapacity(Count); 516if (Count == 0) 598EnsureCapacity(Count + 1); 599_arrayStorage[Count] = new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
RouteValueDictionaryTests.cs (10)
690var count = dict.Count; 703var count = dict.Count; 720var count = dict.Count; 1709Assert.Equal(2, dict.Count); 1734Assert.Equal(2, dict.Count); 1759Assert.Equal(2, dict.Count); 2071Assert.Equal(3, dict.Count); 2078Assert.Equal(2, dict.Count); 2102Assert.Equal(3, dictionary.Count); 2139Assert.Equal(4, dictionary.Count);
Microsoft.AspNetCore.Mvc.Core (1)
Routing\ControllerRequestDelegateFactory.cs (1)
72if (dataTokens is null or { Count: 0 })
Microsoft.AspNetCore.Mvc.Core.Test (1)
AcceptedAtActionResultTests.cs (1)
70Assert.Equal(expectedRouteValuesCount, result.RouteValues.Count);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageRequestDelegateFactory.cs (1)
84if (dataTokens is null or { Count: 0 })
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
FormTagHelperTest.cs (1)
471Assert.Equal(2, routeValueDictionary.Count);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (6)
PageRemoteAttributeTest.cs (1)
56Assert.Equal(2, routeDictionary.Count);
RemoteAttributeTest.cs (5)
93Assert.Equal(2, attribute.RouteData.Count); 111Assert.Equal(2, attribute.RouteData.Count); 130Assert.Equal(3, attribute.RouteData.Count); 189Assert.Equal(2, routeDictionary.Count); 210Assert.Equal(3, routeDictionary.Count);
Microsoft.AspNetCore.Routing (6)
Patterns\RoutePatternFactory.cs (4)
459if (defaults != null && defaults.Count > 0) 461updatedDefaults = new Dictionary<string, object?>(defaults.Count, StringComparer.OrdinalIgnoreCase); 651if (parameterPolicies != null && parameterPolicies.Count > 0) 653updatedParameterPolicies = new Dictionary<string, List<RoutePatternParameterPolicyReference>>(parameterPolicies.Count, StringComparer.OrdinalIgnoreCase);
RouteBase.cs (1)
123if (DataTokens.Count > 0)
Template\TemplateBinder.cs (1)
385if (valueProcessedCount < values.Count)
Microsoft.AspNetCore.Routing.Abstractions (2)
RouteData.cs (2)
157_dataTokens?.Count > 0 ? new RouteValueDictionary(_dataTokens) : null, 159_values?.Count > 0 ? new RouteValueDictionary(_values) : null);
Microsoft.AspNetCore.Routing.Tests (39)
Matching\MatcherAssert.cs (4)
18if (expectedValues.Count != actualValues.Count || 84if (values.Count != actualValues.Count ||
Patterns\RoutePatternMatcherTest.cs (11)
398Assert.Equal<int>(3, values.Count); 419Assert.Equal<int>(5, values.Count); 707Assert.Equal<int>(2, values.Count); 725Assert.Equal<int>(2, values.Count); 743Assert.Equal<int>(2, values.Count); 761Assert.Equal<int>(2, values.Count); 779Assert.Equal<int>(2, values.Count); 797Assert.Equal<int>(2, values.Count); 910Assert.Equal(2, values.Count); 983Assert.Equal(2, values.Count); 1121Assert.Equal(expected.Count, values.Count);
RouteCollectionTest.cs (2)
152Assert.Equal(expectedDataTokens.Count, pathData.DataTokens.Count);
RouteTest.cs (10)
391Assert.Equal(2, context.RouteData.Values.Count); 423Assert.Equal(2, context.RouteData.Values.Count); 526Assert.Equal(3, context.RouteData.Values.Count); 544Assert.Equal(2, context.RouteData.Values.Count); 561Assert.Equal(3, context.RouteData.Values.Count); 788Assert.Equal(expectedDataTokens.Count, pathData.DataTokens.Count); 827Assert.Equal(expectedDataTokens.Count, pathData.DataTokens.Count); 1578Assert.Equal(expectedDictionary.Count, templateRoute.DataTokens.Count);
Template\TemplateBinderTests.cs (1)
723Assert.Equal(2, templateValuesResult.CombinedValues.Count);
Template\TemplateMatcherTests.cs (11)
397Assert.Equal<int>(3, values.Count); 418Assert.Equal<int>(5, values.Count); 706Assert.Equal<int>(2, values.Count); 724Assert.Equal<int>(2, values.Count); 742Assert.Equal<int>(2, values.Count); 760Assert.Equal<int>(2, values.Count); 778Assert.Equal<int>(2, values.Count); 796Assert.Equal<int>(2, values.Count); 909Assert.Equal(2, values.Count); 982Assert.Equal(2, values.Count); 1120Assert.Equal(expected.Count, values.Count);