12 references to Constraint
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
241schema[OpenApiSchemaKeywords.PatternKeyword] = regexRouteConstraint.Constraint.ToString();
Microsoft.AspNetCore.Routing (2)
Constraints\RegexRouteConstraint.cs (2)
99return Constraint.IsMatch(parameterValueString); 108return Constraint.IsMatch(literal);
Microsoft.AspNetCore.Routing.Tests (9)
DefaultParameterPolicyFactoryTest.cs (1)
357Assert.Equal("\\\\d{1,2}", constraint.Constraint.ToString());
Patterns\RoutePatternFactoryTest.cs (8)
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()), 375Assert.Equal("^(foo)$", regex.Constraint.ToString());