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