2 implementations of ResolveConstraint
Microsoft.AspNetCore.Routing (2)
DefaultInlineConstraintResolver.cs (1)
48public virtual IRouteConstraint? ResolveConstraint(string inlineConstraint)
MapRouteRouteBuilderExtensions.cs (1)
153public IRouteConstraint? ResolveConstraint(string inlineConstraint)
35 references to ResolveConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
351constraints.Add(_constraintResolver.ResolveConstraint(constraint.Constraint)!);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2241constraintResolver.Setup(c => c.ResolveConstraint("int"))
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\KnownRouteValueConstraintTests.cs (1)
39var constraint = inlineConstraintResolver.ResolveConstraint("exists");
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
66constraintResolver.Setup(c => c.ResolveConstraint("int"))
Microsoft.AspNetCore.Routing (2)
MapRouteRouteBuilderExtensions.cs (1)
155var routeConstraint = _inner.ResolveConstraint(inlineConstraint);
RouteConstraintBuilder.cs (1)
137var constraint = _inlineConstraintResolver.ResolveConstraint(constraintText);
Microsoft.AspNetCore.Routing.Tests (29)
DefaultInlineConstraintResolverTest.cs (29)
28var constraint = _constraintResolver.ResolveConstraint("required"); 38var constraint = _constraintResolver.ResolveConstraint("int"); 49() => _constraintResolver.ResolveConstraint("int(5)")); 60var constraint = _constraintResolver.ResolveConstraint("alpha"); 70var constraint = _constraintResolver.ResolveConstraint("regex(ab,1)"); 80var constraint = _constraintResolver.ResolveConstraint( 91var constraint = _constraintResolver.ResolveConstraint("bool"); 101Assert.Null(_constraintResolver.ResolveConstraint("composite")); 108var constraint = _constraintResolver.ResolveConstraint("datetime"); 118var constraint = _constraintResolver.ResolveConstraint("decimal"); 128var constraint = _constraintResolver.ResolveConstraint("double"); 138var constraint = _constraintResolver.ResolveConstraint("float"); 148var constraint = _constraintResolver.ResolveConstraint("guid"); 158var constraint = _constraintResolver.ResolveConstraint("int"); 168var constraint = _constraintResolver.ResolveConstraint("length(5)"); 180var constraint = _constraintResolver.ResolveConstraint("length(5, 10)"); 192var constraint = _constraintResolver.ResolveConstraint("long"); 202var constraint = _constraintResolver.ResolveConstraint("max(10)"); 213var constraint = _constraintResolver.ResolveConstraint("maxlength(10)"); 224var constraint = _constraintResolver.ResolveConstraint("min(3)"); 235var constraint = _constraintResolver.ResolveConstraint("minlength(3)"); 246var constraint = _constraintResolver.ResolveConstraint("range(5, 10)"); 264var constraint = resolver.ResolveConstraint("custom(argument)"); 279var constraint = resolver.ResolveConstraint("custom(argument)"); 304var constraint = resolver.ResolveConstraint("custom(argument)"); 319var ex = Assert.Throws<RouteCreationException>(() => resolver.ResolveConstraint("custom")); 334var ex = Assert.Throws<RouteCreationException>(() => resolver.ResolveConstraint("custom(5,6)")); 352Assert.Null(resolver.ResolveConstraint(constraint)); 360var ex = Assert.Throws<RouteCreationException>(() => _constraintResolver.ResolveConstraint("int(5,6)"));