13 instantiations of IntRouteConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2242.Returns(new IntRouteConstraint());
Microsoft.AspNetCore.Mvc.Core.Test (3)
Builder\MvcAreaRouteBuilderExtensionsTest.cs (3)
97constraints: new { id = new IntRouteConstraint() }); 143constraints: new { id = new IntRouteConstraint() }, 196constraints: new { area = new IntRouteConstraint() },
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
67.Returns(new IntRouteConstraint());
Microsoft.AspNetCore.Routing.Tests (8)
Constraints\IntRouteConstraintsTests.cs (1)
19var constraint = new IntRouteConstraint();
DefaultParameterPolicyFactoryTest.cs (2)
101parameterPolicies: new[] { RoutePatternFactory.ParameterPolicy(new IntRouteConstraint()), }); 120parameterPolicies: new[] { RoutePatternFactory.ParameterPolicy(new IntRouteConstraint()), });
Matching\DfaMatcherBuilderTest.cs (4)
3360var endpoint = CreateEndpoint("/a/b/c", constraints: new { a = new IntRouteConstraint(), }); 3475CreateEndpoint("/a/b/c", constraints: new { a = new IntRouteConstraint(), }, metadata: new object[] { new TestMetadata1(), new TestMetadata2(), }), 3477CreateEndpoint("/a/b/c", constraints: new { a = new IntRouteConstraint(), }, metadata: new object[] { new TestMetadata1(), }), 3478CreateEndpoint("/a/b/c", constraints: new { a = new IntRouteConstraint(), }, metadata: new object[] { new TestMetadata2(), }),
Matching\DfaMatcherTest.cs (1)
735var constraint = new OptionalRouteConstraint(new IntRouteConstraint());
28 references to IntRouteConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (10)
DefaultApiDescriptionProviderTest.cs (10)
162[InlineData("api/products/{id:int}", false, typeof(IntRouteConstraint), null)] 163[InlineData("api/products/{id:int?}", true, typeof(IntRouteConstraint), null)] 166[InlineData("api/products/{*id:int}", false, typeof(IntRouteConstraint), null)] 167[InlineData("api/products/{*id:int=5}", true, typeof(IntRouteConstraint), "5")] 208[InlineData("api/products/{id:int}", false, typeof(IntRouteConstraint), null)] 209[InlineData("api/products/{id:int?}", true, typeof(IntRouteConstraint), null)] 210[InlineData("api/products/{id:int=5}", true, typeof(IntRouteConstraint), "5")] 212[InlineData("api/products/{*id:int}", false, typeof(IntRouteConstraint), null)] 213[InlineData("api/products/{*id:int=5}", true, typeof(IntRouteConstraint), "5")] 443Assert.IsType<IntRouteConstraint>(Assert.Single(id2.RouteInfo.Constraints));
Microsoft.AspNetCore.Mvc.Core.Test (3)
Builder\MvcAreaRouteBuilderExtensionsTest.cs (3)
114Assert.IsType<IntRouteConstraint>(kvp.Value); 161Assert.IsType<IntRouteConstraint>(kvp.Value); 209Assert.IsType<IntRouteConstraint>(kvp.Value);
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
253else if (constraint is LongRouteConstraint or IntRouteConstraint)
Microsoft.AspNetCore.Routing (1)
RouteOptions.cs (1)
107AddConstraint<IntRouteConstraint>(defaults, "int");
Microsoft.AspNetCore.Routing.Tests (13)
Constraints\IntRouteConstraintsTests.cs (1)
19var constraint = new IntRouteConstraint();
DefaultInlineConstraintResolverTest.cs (2)
41Assert.IsType<IntRouteConstraint>(constraint); 161Assert.IsType<IntRouteConstraint>(constraint);
DefaultParameterPolicyFactoryTest.cs (6)
68Assert.IsType<IntRouteConstraint>(parameterPolicy); 88Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint); 107Assert.IsType<IntRouteConstraint>(parameterPolicy); 127Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint); 159Assert.IsType<IntRouteConstraint>(parameterPolicy); 188Assert.IsType<IntRouteConstraint>(optionalConstraint.InnerConstraint);
RouteConstraintBuilderTest.cs (1)
69Assert.IsType<IntRouteConstraint>(kvp.Value);
RouteTest.cs (3)
326Assert.Single(compositeConstraint.Constraints, c => c is IntRouteConstraint); 1665Assert.IsType<IntRouteConstraint>(constraint.Constraints.ElementAt(1)); 1683Assert.IsType<IntRouteConstraint>(constraints["id"]);