3 instantiations of OptionalRouteConstraint
Microsoft.AspNetCore.Routing (2)
DefaultParameterPolicyFactory.cs (1)
67
routeConstraint = new
OptionalRouteConstraint
(routeConstraint);
RouteConstraintBuilder.cs (1)
69
var optionalConstraint = new
OptionalRouteConstraint
(constraint);
Microsoft.AspNetCore.Routing.Tests (1)
Matching\DfaMatcherTest.cs (1)
735
var constraint = new
OptionalRouteConstraint
(new IntRouteConstraint());
20 references to OptionalRouteConstraint
Microsoft.AspNetCore.Routing (3)
Constraints\OptionalRouteConstraint.cs (1)
22
/// Creates a new <see cref="
OptionalRouteConstraint
"/> instance given the <paramref name="innerConstraint"/>.
Matching\DfaMatcherBuilder.cs (1)
141
var createdParameterPolicy = (parameterPolicy is
OptionalRouteConstraint
optionalRouteConstraint)
RouteConstraintBuilder.cs (1)
69
var
optionalConstraint = new OptionalRouteConstraint(constraint);
Microsoft.AspNetCore.Routing.Tests (17)
DefaultParameterPolicyFactoryTest.cs (6)
87
var
optionalConstraint = Assert.IsType<
OptionalRouteConstraint
>(parameterPolicy);
126
var
optionalConstraint = Assert.IsType<
OptionalRouteConstraint
>(parameterPolicy);
187
var
optionalConstraint = Assert.IsType<
OptionalRouteConstraint
>(parameterPolicy);
Matching\DfaMatcherTest.cs (1)
735
var
constraint = new OptionalRouteConstraint(new IntRouteConstraint());
RouteConstraintBuilderTest.cs (5)
112
Assert.IsType<
OptionalRouteConstraint
>(Assert.Single(result).Value);
125
Assert.IsType<
OptionalRouteConstraint
>(Assert.Single(result).Value);
140
Assert.IsType<
OptionalRouteConstraint
>(Assert.Single(result).Value);
141
var
optionalConstraint = (
OptionalRouteConstraint
)result.First().Value;
RouteTest.cs (5)
193
Assert.IsType<
OptionalRouteConstraint
>(route.Constraints["id"]);
277
Assert.IsType<
OptionalRouteConstraint
>(route.Constraints["id"]);
320
Assert.IsType<
OptionalRouteConstraint
>(route.Constraints["id"]);
321
var innerConstraint = ((
OptionalRouteConstraint
)route.Constraints["id"]).InnerConstraint;
369
Assert.IsType<
OptionalRouteConstraint
>(route.Constraints["id"]);