40 references to DataTokens
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (20)
RouteDataTest.cs (20)
17
Assert.Empty(routeData.
DataTokens
);
28
original.
DataTokens
.Add("data", "token");
35
Assert.NotSame(routeData.
DataTokens
, original.
DataTokens
);
36
Assert.Equal(routeData.
DataTokens
, original.
DataTokens
);
55
Assert.Equal(routeData.
DataTokens
, copy.
DataTokens
);
72
Assert.Equal(routeData.
DataTokens
, copy.
DataTokens
);
107
routeData.
DataTokens
.Add("data", "token");
115
Assert.Empty(routeData.
DataTokens
);
116
Assert.NotEqual(routeData.
DataTokens
, copy.
DataTokens
);
128
original.
DataTokens
.Add("data", "token1");
140
routeData.
DataTokens
.Add("data2", "token");
148
Assert.Equal(original.
DataTokens
, routeData.
DataTokens
);
149
Assert.NotEqual(routeData.
DataTokens
, copy.
DataTokens
);
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
506
return context.RouteContext.RouteData.
DataTokens
.ContainsKey("DataTokens");
Microsoft.AspNetCore.Routing (3)
DataTokensMetadata.cs (1)
13
/// type provides data tokens value for <see cref="RouteData.
DataTokens
"/> associated
IDataTokenMetadata.cs (1)
10
/// type provides data tokens value for <see cref="RouteData.
DataTokens
"/> associated
RouteBase.cs (1)
125
MergeValues(context.RouteData.
DataTokens
, DataTokens);
Microsoft.AspNetCore.Routing.Abstractions (4)
RouteData.cs (4)
117
/// <see cref="Values"/>, and merging <paramref name="dataTokens"/> into <see cref="
DataTokens
"/>.
134
/// A <see cref="RouteValueDictionary"/> to merge into <see cref="
DataTokens
"/>. If <c>null</c>, then
135
/// <see cref="
DataTokens
"/> will not be changed.
181
DataTokens
[kvp.Key] = kvp.Value;
Microsoft.AspNetCore.Routing.Tests (8)
RouteTest.cs (8)
62
var originalDataTokens = context.RouteData.
DataTokens
;
101
Assert.Equal("Contoso", context.RouteData.
DataTokens
["company"]);
102
Assert.Equal("Friday", context.RouteData.
DataTokens
["today"]);
103
Assert.Same(originalDataTokens, context.RouteData.
DataTokens
);
116
var originalDataTokens = context.RouteData.
DataTokens
;
161
Assert.Equal("Contoso", context.RouteData.
DataTokens
["company"]);
162
Assert.Equal("Friday", context.RouteData.
DataTokens
["today"]);
444
context.RouteData.
DataTokens
.Add("company", "contoso");
Mvc.RoutingWebSite (4)
Controllers\DataTokensController.cs (1)
12
return RouteData.
DataTokens
;
Controllers\RouteDataController.cs (3)
30
if (!context.RouteData.
DataTokens
.ContainsKey("actionName"))
32
context.RouteData.
DataTokens
.Add("actionName", ((ControllerActionDescriptor)context.ActionDescriptor).ActionName);
39
var dataTokens = RouteData.
DataTokens
;