3 types derived from RegexRouteConstraint
Microsoft.AspNetCore.Routing (2)
Microsoft.AspNetCore.Routing.Tests (1)
24 instantiations of RegexRouteConstraint
Microsoft.AspNetCore.Routing (2)
Microsoft.AspNetCore.Routing.Tests (20)
Patterns\RoutePatternFactoryTest.cs (10)
142var constraints = new { a = new RegexRouteConstraint("foo"), b = new RegexRouteConstraint("bar") };
187var constraints = new { d = new RegexRouteConstraint("foo"), e = new RegexRouteConstraint("bar") };
223var constraints = new { d = new object[] { new RegexRouteConstraint("foo"), new RegexRouteConstraint("bar"), "baz" } };
254var constraints = new { b = "fizz", c = new object[] { new RegexRouteConstraint("foo"), new RegexRouteConstraint("bar"), "baz" } };
800var policies = new { X = new RegexRouteConstraint("x"), };
840var right = RoutePatternFactory.Parse("/b", defaults: null, parameterPolicies: new { X = new RegexRouteConstraint("foo") });
RoutingSandbox (1)
RoutingWebSite (1)
28 references to RegexRouteConstraint
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Routing.Tests (23)
Patterns\RoutePatternFactoryTest.cs (15)
156c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy),
160c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy));
169c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy),
177c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy));
206c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy));
213c => Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy));
242c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()),
243c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()),
244c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()));
280c => Assert.Equal("^(fizz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()));
287c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()),
288c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()),
289c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()),
374var regex = Assert.IsType<RegexRouteConstraint>(Assert.Single(kvp.Value).ParameterPolicy);