12 references to Constraint
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
241
schema[OpenApiSchemaKeywords.PatternKeyword] = regexRouteConstraint.
Constraint
.ToString();
Microsoft.AspNetCore.Routing (2)
Constraints\RegexRouteConstraint.cs (2)
99
return
Constraint
.IsMatch(parameterValueString);
108
return
Constraint
.IsMatch(literal);
Microsoft.AspNetCore.Routing.Tests (9)
DefaultParameterPolicyFactoryTest.cs (1)
357
Assert.Equal("\\\\d{1,2}", constraint.
Constraint
.ToString());
Patterns\RoutePatternFactoryTest.cs (8)
242
c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()),
243
c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()),
244
c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()));
280
c => Assert.Equal("^(fizz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()));
287
c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()),
288
c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()),
289
c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).
Constraint
.ToString()),
375
Assert.Equal("^(foo)$", regex.
Constraint
.ToString());