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