7 instantiations of LengthRouteConstraint
Microsoft.AspNetCore.Routing.Tests (7)
Constraints\LengthRouteConstraintTests.cs (6)
18var constraint = new LengthRouteConstraint(length); 36var constraint = new LengthRouteConstraint(min, max); 53() => new LengthRouteConstraint(-1), 67() => new LengthRouteConstraint(-1, 3), 81() => new LengthRouteConstraint(0, -1), 96() => new LengthRouteConstraint(3, 2),
Template\TemplateBinderTests.cs (1)
1305parameterPolicies: new (string, IParameterPolicy)[] { ("param", new LengthRouteConstraint(500)), ("param", new SlugifyParameterTransformer()), });
11 references to LengthRouteConstraint
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
243else if (constraint is LengthRouteConstraint lengthRouteConstraint)
Microsoft.AspNetCore.Routing (3)
Constraints\LengthRouteConstraint.cs (2)
23/// Initializes a new instance of the <see cref="LengthRouteConstraint" /> class that constrains 39/// Initializes a new instance of the <see cref="LengthRouteConstraint" /> class that constrains
RouteOptions.cs (1)
119AddConstraint<LengthRouteConstraint>(defaults, "length");
Microsoft.AspNetCore.Routing.Tests (7)
Constraints\LengthRouteConstraintTests.cs (2)
18var constraint = new LengthRouteConstraint(length); 36var constraint = new LengthRouteConstraint(min, max);
DefaultInlineConstraintResolverTest.cs (5)
171Assert.IsType<LengthRouteConstraint>(constraint); 172Assert.Equal(5, ((LengthRouteConstraint)constraint).MinLength); 173Assert.Equal(5, ((LengthRouteConstraint)constraint).MaxLength); 183var lengthConstraint = Assert.IsType<LengthRouteConstraint>(constraint);