7 instantiations of LengthRouteConstraint
Microsoft.AspNetCore.Routing.Tests (7)
Constraints\LengthRouteConstraintTests.cs (6)
18
var constraint = new
LengthRouteConstraint
(length);
36
var 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)
1305
parameterPolicies: new (string, IParameterPolicy)[] { ("param", new
LengthRouteConstraint
(500)), ("param", new SlugifyParameterTransformer()), });
11 references to LengthRouteConstraint
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
243
else 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)
119
AddConstraint<
LengthRouteConstraint
>(defaults, "length");
Microsoft.AspNetCore.Routing.Tests (7)
Constraints\LengthRouteConstraintTests.cs (2)
18
var
constraint = new LengthRouteConstraint(length);
36
var
constraint = new LengthRouteConstraint(min, max);
DefaultInlineConstraintResolverTest.cs (5)
171
Assert.IsType<
LengthRouteConstraint
>(constraint);
172
Assert.Equal(5, ((
LengthRouteConstraint
)constraint).MinLength);
173
Assert.Equal(5, ((
LengthRouteConstraint
)constraint).MaxLength);
183
var
lengthConstraint = Assert.IsType<
LengthRouteConstraint
>(constraint);