6 writes to RouteData
Microsoft.AspNetCore.Mvc.Core (1)
Routing\ActionConstraintMatcherPolicy.cs (1)
233RouteData = routeData,
Microsoft.AspNetCore.Mvc.Core.Test (3)
ActionConstraints\HttpMethodActionConstraintTest.cs (1)
81routeContext.RouteData = new RouteData();
ConsumesAttributeTests.cs (1)
408routeContext.RouteData = new RouteData();
Infrastructure\ActionSelectorTest.cs (1)
1115RouteData = routeData,
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsHttpMethodActionConstraintTest.cs (1)
100routeContext.RouteData = new RouteData();
Microsoft.AspNetCore.Routing.Abstractions (1)
RouteContext.cs (1)
23RouteData = new RouteData();
179 references to RouteData
Microsoft.AspNetCore.Mvc.Core (6)
Infrastructure\ActionSelector.cs (2)
69var matches = cache.Select(context.RouteData.Values); 75_logger.NoActionsMatched(context.RouteData.Values);
Routing\MvcAttributeRouteHandler.cs (2)
57_logger.NoActionsMatched(context.RouteData.Values); 65context.RouteData.Values[kvp.Key] = kvp.Value;
Routing\MvcRouteHandler.cs (2)
46_logger.NoActionsMatched(context.RouteData.Values); 53_logger.NoActionsMatched(context.RouteData.Values);
Microsoft.AspNetCore.Mvc.Core.Test (49)
ConsumesAttributeTests.cs (1)
412routeContext.RouteData.Values.Add(kvp.Key, kvp.Value);
Infrastructure\ActionSelectorTest.cs (41)
55routeContext.RouteData.Values.Add("controller", "Home"); 56routeContext.RouteData.Values.Add("action", "Index"); 95routeContext.RouteData.Values.Add("controller", "Home"); 96routeContext.RouteData.Values.Add("action", "Index"); 97routeContext.RouteData.Values.Add( 136routeContext.RouteData.Values.Add("controller", "Home"); 137routeContext.RouteData.Values.Add("action", "Index"); 174routeContext.RouteData.Values.Add("controller", "Foo"); 175routeContext.RouteData.Values.Add("action", "Index"); 207routeContext.RouteData.Values.Add("controller", "Home"); 208routeContext.RouteData.Values.Add("action", "Index"); 259routeContext.RouteData.Values.Add("controller", "Home"); 260routeContext.RouteData.Values.Add("action", "Index"); 311routeContext.RouteData.Values.Add("controller", "HOME"); 312routeContext.RouteData.Values.Add("action", "iNDex"); 343routeContext.RouteData.Values.Add("area", ""); 344routeContext.RouteData.Values.Add("controller", "Home"); 345routeContext.RouteData.Values.Add("action", "Index"); 377routeContext.RouteData.Values.Add("area", ""); 378routeContext.RouteData.Values.Add("controller", "HoMe"); 379routeContext.RouteData.Values.Add("action", "InDeX"); 411routeContext.RouteData.Values.Add("area", null); 412routeContext.RouteData.Values.Add("controller", "Home"); 413routeContext.RouteData.Values.Add("action", "Index"); 445routeContext.RouteData.Values.Add("foo", ""); 446routeContext.RouteData.Values.Add("controller", "Home"); 447routeContext.RouteData.Values.Add("action", "Index"); 479routeContext.RouteData.Values.Add("foo", null); 480routeContext.RouteData.Values.Add("controller", "Home"); 481routeContext.RouteData.Values.Add("action", "Index"); 834context.RouteData.Values.Add("controller", "Store"); 835context.RouteData.Values.Add("action", "Buy"); 857routeContext.RouteData.Values.Add("controller", "HttpMethodAttributeTests_RestOnly"); 858routeContext.RouteData.Values.Add("action", "Patch"); 878routeContext.RouteData.Values.Add("controller", "HttpMethodAttributeTests_RestOnly"); 879routeContext.RouteData.Values.Add("action", "Put"); 896routeContext.RouteData.Values.Add("controller", "HttpMethodAttributeTests_RestOnly"); 933routeContext.RouteData.Values.Add("controller", "ActionName"); 934routeContext.RouteData.Values.Add("action", "RPCMethodWithHttpGet"); 963routeContext.RouteData.Values.Add("controller", "ActionName"); 964routeContext.RouteData.Values.Add("action", actionName);
Routing\AttributeRouteTest.cs (4)
55if (routeContext.RouteData.Values.ContainsKey("key1")) 59else if (routeContext.RouteData.Values.ContainsKey("key2")) 91Assert.Equal("5", context.RouteData.Values["key2"]); 108Assert.Empty(context.RouteData.Values);
Routing\MvcRouteHandlerTests.cs (3)
31context.RouteData.Values.Add("controller", "Home"); 32context.RouteData.Values.Add("action", "Index"); 116routingFeature.RouteData = routeContext.RouteData;
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
506return context.RouteContext.RouteData.DataTokens.ContainsKey("DataTokens");
Microsoft.AspNetCore.Routing (13)
Route.cs (1)
94context.RouteData.Routers.Add(_target);
RouteBase.cs (3)
115if (!_matcher.TryMatch(requestPath, context.RouteData.Values)) 125MergeValues(context.RouteData.DataTokens, DataTokens); 130context.RouteData.Values,
RouteCollection.cs (2)
70var snapshot = context.RouteData.PushState(null, values: null, dataTokens: null); 75context.RouteData.Routers.Add(route);
RouterMiddleware.cs (3)
44context.RouteData.Routers.Add(_router); 57RouteData = context.RouteData 61httpContext.Request.RouteValues = context.RouteData.Values;
Tree\TreeRouter.cs (4)
186var snapshot = context.RouteData.PushState(router: null, values: null, dataTokens: null); 196if (!matcher.TryMatch(context.HttpContext.Request.Path, context.RouteData.Values)) 202context.RouteData.Values, 212context.RouteData.Routers.Add(entry.Handler);
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcher.cs (1)
27httpContext.Request.RouteValues = routeContext.RouteData.Values;
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcher.cs (1)
28httpContext.Request.RouteValues = routeContext.RouteData.Values;
Microsoft.AspNetCore.Routing.Tests (108)
Matching\RouteMatcher.cs (1)
27httpContext.Request.RouteValues = routeContext.RouteData.Values;
Matching\TreeRouterMatcher.cs (1)
28httpContext.Request.RouteValues = routeContext.RouteData.Values;
RouteCollectionTest.cs (5)
182Assert.Single(context.RouteData.Routers); 183Assert.Same(route1.Object, context.RouteData.Routers[0]); 208Assert.Single(context.RouteData.Routers); 209Assert.Same(route2.Object, context.RouteData.Routers[0]); 233Assert.Empty(context.RouteData.Routers);
RouteTest.cs (55)
59var originalRouteDataValues = context.RouteData.Values; 62var originalDataTokens = context.RouteData.DataTokens; 71routeValues = ctx.RouteData.Values; 95Assert.True(context.RouteData.Values.ContainsKey("country")); 96Assert.Equal("USA", context.RouteData.Values["country"]); 97Assert.True(context.RouteData.Values.ContainsKey("id")); 98Assert.Equal("5", context.RouteData.Values["id"]); 99Assert.Same(originalRouteDataValues, context.RouteData.Values); 101Assert.Equal("Contoso", context.RouteData.DataTokens["company"]); 102Assert.Equal("Friday", context.RouteData.DataTokens["today"]); 103Assert.Same(originalDataTokens, context.RouteData.DataTokens); 113var originalRouteDataValues = context.RouteData.Values; 116var originalDataTokens = context.RouteData.DataTokens; 125routeValues = ctx.RouteData.Values; 156Assert.True(context.RouteData.Values.ContainsKey("country")); 157Assert.Equal("USA", context.RouteData.Values["country"]); 158Assert.True(context.RouteData.Values.ContainsKey("id")); 159Assert.Equal("5", context.RouteData.Values["id"]); 161Assert.Equal("Contoso", context.RouteData.DataTokens["company"]); 162Assert.Equal("Friday", context.RouteData.DataTokens["today"]); 179routeValues = ctx.RouteData.Values; 203Assert.True(context.RouteData.Values.ContainsKey("id")); 204Assert.Equal("5", context.RouteData.Values["id"]); 221routeValues = ctx.RouteData.Values; 245Assert.True(context.RouteData.Values.ContainsKey("ssn")); 246Assert.Equal("123-456-7890", context.RouteData.Values["ssn"]); 263routeValues = ctx.RouteData.Values; 286Assert.False(context.RouteData.Values.ContainsKey("id")); 303routeValues = ctx.RouteData.Values; 337Assert.True(context.RouteData.Values.ContainsKey("id")); 338Assert.Equal("5", context.RouteData.Values["id"]); 355routeValues = ctx.RouteData.Values; 391Assert.Equal(2, context.RouteData.Values.Count); 392Assert.Equal("Home", context.RouteData.Values["controller"]); 393Assert.Equal("Index", context.RouteData.Values["action"]); 408Assert.Empty(context.RouteData.Values); 423Assert.Equal(2, context.RouteData.Values.Count); 424Assert.Equal("Home", context.RouteData.Values["controller"]); 425Assert.Equal("Index", context.RouteData.Values["action"]); 444context.RouteData.DataTokens.Add("company", "contoso"); 478var value = Assert.Single(context.RouteData.Values); 496Assert.Single(context.RouteData.Routers); 497Assert.Same(target, context.RouteData.Routers[0]); 511Assert.Null(context.RouteData.Values["1controller"]); 526Assert.Equal(3, context.RouteData.Values.Count); 527Assert.Equal("Home", context.RouteData.Values["controller"]); 528Assert.Equal("Create", context.RouteData.Values["action"]); 529Assert.Equal("xml", context.RouteData.Values["format"]); 544Assert.Equal(2, context.RouteData.Values.Count); 545Assert.Equal("Home", context.RouteData.Values["controller"]); 546Assert.Equal("Create", context.RouteData.Values["action"]); 561Assert.Equal(3, context.RouteData.Values.Count); 562Assert.Equal("Home", context.RouteData.Values["controller"]); 563Assert.Equal("Create", context.RouteData.Values["action"]); 564Assert.Equal("xml", context.RouteData.Values["format"]);
Tree\TreeRouterTest.cs (46)
56Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 117Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 164Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 167var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key); 216Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 219var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key); 259Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 262var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key); 394Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 541Assert.Equal(expectedResult, context.RouteData.Values["path"]); 563Assert.Null(context.RouteData.Values["path"]); 579context.RouteData.Values["path"] = "existing-value"; 586Assert.Equal("existing-value", context.RouteData.Values["path"]); 602context.RouteData.Values["path"] = "existing-value"; 609Assert.Equal("default", context.RouteData.Values["path"]); 638Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 666Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 695Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 745Assert.Equal(p1, context.RouteData.Values["p1"]); 749Assert.Equal(p2, context.RouteData.Values["p2"]); 753Assert.Equal(p3, context.RouteData.Values["p3"]); 1705var originalRouteData = context.RouteData; 1712Assert.Equal("Bar", context.RouteData.Values["path"]); 1725var originalRouteData = context.RouteData; 1732Assert.Equal("default", context.RouteData.Values["path"]); 1747nestedValues = new RouteValueDictionary(c.RouteData.Values); 1748nestedRouters = new List<IRouter>(c.RouteData.Routers); 1759var routeData = context.RouteData; 1762var originalValues = new RouteValueDictionary(context.RouteData.Values); 1768Assert.Equal(originalValues, context.RouteData.Values); 1769Assert.NotEqual(nestedValues, context.RouteData.Values); 1784nestedValues = new RouteValueDictionary(c.RouteData.Values); 1785nestedRouters = new List<IRouter>(c.RouteData.Routers); 1796context.RouteData.Values.Add("action", "Index"); 1802Assert.NotEqual(nestedValues, context.RouteData.Values); 1805Assert.Equal("Index", context.RouteData.Values["action"]); 1807Assert.DoesNotContain(context.RouteData.Values, kvp => kvp.Key == "test_route_group"); 1810Assert.Empty(context.RouteData.Routers); 1828nestedValues = new RouteValueDictionary(c.RouteData.Values); 1829nestedRouters = new List<IRouter>(c.RouteData.Routers); 1839context.RouteData.Values.Add("action", "Index"); 1845Assert.NotEqual(nestedValues, context.RouteData.Values); 1847Assert.Equal("Index", context.RouteData.Values["action"]); 1849Assert.DoesNotContain(context.RouteData.Values, kvp => kvp.Key == "test_route_group"); 1852Assert.Empty(context.RouteData.Routers); 1874nestedValues = new RouteValueDictionary(c.RouteData.Values);