Implemented interface members:
66 references to ContainsKey
Microsoft.AspNetCore.Http.Abstractions.Tests (17)
RouteValueDictionaryTests.cs (17)
1177var result = dict.ContainsKey("key"); 1190var result = dict.ContainsKey(""); 1203var result = dict.ContainsKey("other"); 1218var result = dict.ContainsKey("key"); 1233var result = dict.ContainsKey("kEy"); 1251var result = dict.ContainsKey("other"); 1268var result = dict.ContainsKey("key"); 1285var result = dict.ContainsKey("kEy"); 1710Assert.False(dict.ContainsKey("key")); 1711Assert.True(dict.ContainsKey("other")); 1712Assert.True(dict.ContainsKey("dotnet")); 1735Assert.False(dict.ContainsKey("key")); 1736Assert.True(dict.ContainsKey("other")); 1737Assert.True(dict.ContainsKey("dotnet")); 1760Assert.False(dict.ContainsKey("key")); 1761Assert.True(dict.ContainsKey("other")); 1762Assert.True(dict.ContainsKey("dotnet"));
Microsoft.AspNetCore.Http.Microbenchmarks (9)
RouteValueDictionaryBenchmark.cs (9)
65_arrayValues.ContainsKey("id"); 71_arrayValues.ContainsKey("name"); 77_propertyValues.ContainsKey("id"); 83_propertyValues.ContainsKey("name"); 174if (!arrayValues.ContainsKey("name")) 185if (!propertyValues.ContainsKey("name")) 196if (!dictionary.ContainsKey("action")) 201if (!dictionary.ContainsKey("controller")) 206if (!dictionary.ContainsKey("area"))
Microsoft.AspNetCore.Mvc.Core (7)
Routing\EndpointRoutingUrlHelper.cs (2)
44if (!values.ContainsKey("action") && 57if (!values.ContainsKey("controller") &&
Routing\UrlHelperBase.cs (5)
234if (!values.ContainsKey("action") && 247if (!values.ContainsKey("controller") && 269if (!values.ContainsKey("page") && 282if (!values.ContainsKey("handler") && 283(ambientValues?.ContainsKey("handler") ?? false))
Microsoft.AspNetCore.Mvc.Core.Test (2)
Routing\AttributeRouteTest.cs (2)
55if (routeContext.RouteData.Values.ContainsKey("key1")) 59else if (routeContext.RouteData.Values.ContainsKey("key2"))
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
506return context.RouteContext.RouteData.DataTokens.ContainsKey("DataTokens");
Microsoft.AspNetCore.Routing (9)
Patterns\RoutePatternMatcher.cs (2)
179if (defaultValue != null || !values.ContainsKey(parameter.Name)) 192if (!values.ContainsKey(kvp.Key))
RouteBase.cs (1)
258if (result.ContainsKey(parameter.Name!))
Template\TemplateBinder.cs (5)
282_defaults?.ContainsKey(parameter.Name) != true) 391if (!_defaults!.ContainsKey(kvp.Key)) 396if (!acceptedValues.ContainsKey(kvp.Key)) 596if (_defaults != null && _defaults.ContainsKey(kvp.Key)) 712if (parameter == null && !acceptedValues.ContainsKey(kvp.Key))
Tree\TreeRouter.cs (1)
299if (entry.RequiredLinkValues.ContainsKey(kvp.Key))
Microsoft.AspNetCore.Routing.Tests (20)
Patterns\RoutePatternMatcherTest.cs (3)
931Assert.False(values.ContainsKey("action")); 949Assert.False(values.ContainsKey("controller")); 986Assert.False(values.ContainsKey("id"));
RouteCollectionTest.cs (1)
155Assert.True(pathData.DataTokens.ContainsKey(dataToken.Key));
RouterMiddlewareTest.cs (2)
42Assert.True(routingFeature.RouteData.Values.ContainsKey("id")); 43Assert.True(context.Request.RouteValues.ContainsKey("id"));
RouteTest.cs (11)
95Assert.True(context.RouteData.Values.ContainsKey("country")); 97Assert.True(context.RouteData.Values.ContainsKey("id")); 156Assert.True(context.RouteData.Values.ContainsKey("country")); 158Assert.True(context.RouteData.Values.ContainsKey("id")); 203Assert.True(context.RouteData.Values.ContainsKey("id")); 245Assert.True(context.RouteData.Values.ContainsKey("ssn")); 286Assert.False(context.RouteData.Values.ContainsKey("id")); 337Assert.True(context.RouteData.Values.ContainsKey("id")); 791Assert.True(pathData.DataTokens.ContainsKey(dataToken.Key)); 830Assert.True(pathData.DataTokens.ContainsKey(dataToken.Key)); 1581Assert.True(templateRoute.DataTokens.ContainsKey(expectedKey));
Template\TemplateMatcherTests.cs (3)
930Assert.False(values.ContainsKey("action")); 948Assert.False(values.ContainsKey("controller")); 985Assert.False(values.ContainsKey("id"));
Mvc.RoutingWebSite (1)
Controllers\RouteDataController.cs (1)
30if (!context.RouteData.DataTokens.ContainsKey("actionName"))