1 write to RequiredValues
Microsoft.AspNetCore.Routing (1)
Patterns\RoutePattern.cs (1)
57
RequiredValues
= requiredValues;
60 references to RequiredValues
Microsoft.AspNetCore.Mvc.Core.Test (19)
Routing\ActionEndpointDataSourceBaseTest.cs (5)
36
Assert.Equal("Value", endpoint.RoutePattern.
RequiredValues
["Name"]);
100
Assert.Equal("TestController", routePattern.
RequiredValues
["controller"]);
101
Assert.Equal("TestAction", routePattern.
RequiredValues
["action"]);
122
Assert.Equal("NewTestController", routePattern.
RequiredValues
["controller"]);
123
Assert.Equal("NewTestAction", routePattern.
RequiredValues
["action"]);
Routing\ActionEndpointFactoryTest.cs (14)
150
Assert.Equal("TestController", endpoint.RoutePattern.
RequiredValues
["controller"]);
151
Assert.Equal("TestAction", endpoint.RoutePattern.
RequiredValues
["action"]);
187
Assert.Equal("TestAction", endpoint.RoutePattern.
RequiredValues
["action"]);
233
Assert.Equal("TestController", endpoint.RoutePattern.
RequiredValues
["controller"]);
234
Assert.Equal("TestAction", endpoint.RoutePattern.
RequiredValues
["action"]);
235
Assert.False(endpoint.RoutePattern.
RequiredValues
.ContainsKey("page"));
251
Assert.Equal("TestController", endpoint.RoutePattern.
RequiredValues
["controller"]);
252
Assert.Equal("TestAction", endpoint.RoutePattern.
RequiredValues
["action"]);
253
Assert.False(endpoint.RoutePattern.
RequiredValues
.ContainsKey("page"));
348
Assert.Equal("Index", matcherEndpoint.RoutePattern.
RequiredValues
["action"]);
349
Assert.Equal("Home", matcherEndpoint.RoutePattern.
RequiredValues
["controller"]);
356
Assert.Equal("Index", matcherEndpoint.RoutePattern.
RequiredValues
["action"]);
357
Assert.Equal("Home", matcherEndpoint.RoutePattern.
RequiredValues
["controller"]);
415
AssertIsSubset(new RouteValueDictionary(action.RouteValues), endpoint.RoutePattern.
RequiredValues
);
Microsoft.AspNetCore.Mvc.RazorPages.Test (5)
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (5)
36
Assert.Equal("Value", endpoint.RoutePattern.
RequiredValues
["Name"]);
100
Assert.Equal("TestController", routePattern.
RequiredValues
["controller"]);
101
Assert.Equal("TestAction", routePattern.
RequiredValues
["action"]);
122
Assert.Equal("NewTestController", routePattern.
RequiredValues
["controller"]);
123
Assert.Equal("NewTestAction", routePattern.
RequiredValues
["action"]);
Microsoft.AspNetCore.Routing (20)
EndpointDataSource.cs (1)
111
var routeValues = routeEndpoint.RoutePattern.
RequiredValues
;
Matching\DfaMatcherBuilder.cs (1)
982
if (!routePattern.
RequiredValues
.TryGetValue(parameterPart.Name, out value))
Patterns\DefaultRoutePatternTransformer.cs (1)
183
foreach (var kvp in original.
RequiredValues
)
Patterns\RoutePattern.cs (3)
24
/// A marker object that can be used in <see cref="
RequiredValues
"/> to designate that
28
/// <see cref="RequiredValueAny"/> is only use in routing is in <see cref="RoutePattern.
RequiredValues
"/>.
83
/// <see cref="
RequiredValues
"/> allows a framework to substitute route values into a parameterized template
Patterns\RoutePatternFactory.cs (5)
120
/// Route values that can be substituted for parameters in the route pattern. See remarks on <see cref="RoutePattern.
RequiredValues
"/>.
149
/// Route values that can be substituted for parameters in the route pattern. See remarks on <see cref="RoutePattern.
RequiredValues
"/>.
1095
var requiredValues = CombineDictionaries(left.
RequiredValues
, right.
RequiredValues
, rawText, nameof(RoutePattern.
RequiredValues
));
RouteValuesAddressScheme.cs (3)
101
if (metadata == null && routeEndpoint.RoutePattern.
RequiredValues
.Count == 0)
113
routeEndpoint.RoutePattern.
RequiredValues
,
118
if (routeEndpoint.RoutePattern.
RequiredValues
.Count > 0)
Template\RoutePrecedence.cs (1)
266
if (routePattern.
RequiredValues
.TryGetValue(parameterPart.Name, out var requiredValue) &&
Template\TemplateBinder.cs (5)
111
_requiredKeys = pattern.
RequiredValues
.Keys.ToArray();
222
if (!_pattern.
RequiredValues
.TryGetValue(key, out var requiredValue))
227
if (!RoutePartsEqual(ambientValue, _pattern.
RequiredValues
[key]) &&
228
!RoutePattern.IsRequiredValueAny(_pattern.
RequiredValues
[key]))
311
if (!copyAmbientValues && !hasExplicitValue && _pattern.
RequiredValues
.TryGetValue(key, out var requiredValue))
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
143
requiredLinkValues: new RouteValueDictionary(endpoint.RoutePattern.
RequiredValues
),
Microsoft.AspNetCore.Routing.Tests (15)
Patterns\DefaultRoutePatternTransformerTest.cs (11)
38
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
84
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
143
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
165
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
192
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
227
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
268
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
309
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
331
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
353
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
375
actual.
RequiredValues
.OrderBy(kvp => kvp.Key),
Patterns\RoutePatternFactoryTest.cs (4)
552
action.
RequiredValues
.OrderBy(kvp => kvp.Key),
572
action.
RequiredValues
.OrderBy(kvp => kvp.Key),
592
action.
RequiredValues
.OrderBy(kvp => kvp.Key),
791
var (key, value) = Assert.Single(combined.
RequiredValues
);