1 write to ConstraintMap
Microsoft.AspNetCore.Routing.Tests (1)
Matching\DfaMatcherBuilderTest.cs (1)
3546
ConstraintMap
=
46 references to ConstraintMap
Microsoft.AspNetCore.Mvc.Core (1)
DependencyInjection\MvcCoreRouteOptionsSetup.cs (1)
23
options.
ConstraintMap
.Add("exists", typeof(KnownRouteValueConstraint));
Microsoft.AspNetCore.Mvc.Core.Test (2)
Routing\ActionEndpointDataSourceBaseTest.cs (1)
144
options.
ConstraintMap
["upper-case"] = typeof(UpperCaseParameterTransform);
Routing\ActionEndpointFactoryTest.cs (1)
25
options.
ConstraintMap
["upper-case"] = typeof(UpperCaseParameterTransform);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (1)
144
options.
ConstraintMap
["upper-case"] = typeof(UpperCaseParameterTransform);
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiDocumentServiceTestsBase.cs (2)
72
routeOptions.
ConstraintMap
["regex"] = typeof(RegexInlineRouteConstraint);
151
options.
ConstraintMap
["regex"] = typeof(RegexInlineRouteConstraint);
Microsoft.AspNetCore.Routing (2)
DefaultParameterPolicyFactory.cs (1)
50
nameof(RouteOptions.
ConstraintMap
)));
RouteConstraintBuilder.cs (1)
129
/// based on <paramref name="constraintText"/>. See <see cref="RouteOptions.
ConstraintMap
"/> to register
Microsoft.AspNetCore.Routing.Tests (25)
DefaultInlineConstraintResolverTest.cs (3)
260
routeOptions.
ConstraintMap
.Add("custom", typeof(CustomRouteConstraint));
315
routeOptions.
ConstraintMap
.Add("custom", typeof(string));
330
routeOptions.
ConstraintMap
.Add("custom", typeof(MultiConstructorRouteConstraint));
DefaultLinkGeneratorTest.cs (4)
179
o.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer);
205
o.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer);
317
o.
ConstraintMap
["upper-case"] = typeof(UpperCaseParameterTransform);
343
o.
ConstraintMap
["upper-case"] = typeof(UpperCaseParameterTransform);
DefaultParameterPolicyFactoryTest.cs (12)
27
$"Register the constraint type with '{typeof(RouteOptions)}.{nameof(RouteOptions.
ConstraintMap
)}'.",
36
options.
ConstraintMap
.Add("bad", typeof(string));
196
options.
ConstraintMap
.Add("customParameterPolicy", typeof(CustomParameterPolicy));
215
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithArguments));
236
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithMultipleArguments));
259
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithOnlyServiceArguments));
280
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithMultipleCtors));
301
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithMultipleCtorsInAscendingOrder));
323
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithAmbiguousMultipleCtors));
344
options.
ConstraintMap
.Add("regex-service", typeof(RegexInlineRouteConstraintWithService));
365
options.
ConstraintMap
.Add("customConstraintPolicy", typeof(CustomParameterPolicyWithArguments));
385
options.
ConstraintMap
.Add("customParameterPolicy", typeof(CustomParameterPolicy));
InlineRouteParameterParserTests.cs (1)
962
.
ConstraintMap
Matching\DfaMatcherTest.cs (1)
34
options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer);
RouteOptionsTests.cs (2)
20
services.AddRouting(options => options.
ConstraintMap
.Add("foo", typeof(TestRouteConstraint)));
25
Assert.Equal("TestRouteConstraint", accessor.Value.
ConstraintMap
["foo"].Name);
RouteTest.cs (1)
1863
options.
ConstraintMap
["test-policy"] = typeof(TestPolicy);
RoutingServiceCollectionExtensionsTests.cs (1)
80
var regexRouteConstraintType = options.Value.
ConstraintMap
["regex"];
Microsoft.AspNetCore.Tests (2)
WebHostTests.cs (2)
123
Assert.True(routeOptions.Value.
ConstraintMap
.ContainsKey("regex"));
124
Assert.Equal(typeof(RegexInlineRouteConstraint), routeOptions.Value.
ConstraintMap
["regex"]);
Mvc.RoutingWebSite (9)
Startup.cs (1)
112
services.AddRouting(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamic.cs (1)
24
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicAndRazorPages.cs (1)
19
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicOrder.cs (1)
39
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForEndpointFilters.cs (1)
17
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForFallback.cs (1)
22
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForGroups.cs (1)
17
services.Configure<RouteOptions>(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
StartupForLinkGenerator.cs (1)
30
options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer);
StartupRoutingDifferentBranches.cs (1)
87
services.AddRouting(options => options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer));
RoutingSandbox (1)
UseEndpointRoutingStartup.cs (1)
18
options.
ConstraintMap
["slugify"] = typeof(SlugifyParameterTransformer);
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
18
options.
ConstraintMap
.Add("endsWith", typeof(EndsWithStringRouteConstraint));