2 writes to InlineConstraints
Microsoft.AspNetCore.Routing (2)
Template\TemplatePart.cs (2)
44InlineConstraints = parameter.ParameterPolicies?.Select(p => new InlineConstraint(p)) ?? Enumerable.Empty<InlineConstraint>(); 97InlineConstraints = inlineConstraints ?? Enumerable.Empty<InlineConstraint>(),
82 references to InlineConstraints
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
DefaultApiDescriptionProvider.cs (2)
347if (routeParameter.InlineConstraints != null) 349foreach (var constraint in routeParameter.InlineConstraints)
Microsoft.AspNetCore.Routing (12)
RouteBase.cs (1)
226foreach (var inlineConstraint in parameter.InlineConstraints)
Template\RoutePrecedence.cs (4)
166if (part.InlineConstraints != null && part.InlineConstraints.Any()) 236if (part.InlineConstraints != null && part.InlineConstraints.Any())
Template\TemplatePart.cs (1)
173var constraints = InlineConstraints.Select(c => new RoutePatternParameterPolicyReference(c.Constraint));
Tree\TreeRouteBuilder.cs (4)
118if (parameter.InlineConstraints != null) 124foreach (var constraint in parameter.InlineConstraints) 203if (parameter.InlineConstraints != null) 210foreach (var constraint in parameter.InlineConstraints)
Tree\UrlMatchingTree.cs (2)
139if (part.IsParameter && part.InlineConstraints.Any() && !part.IsCatchAll) 161if (part.IsParameter && part.InlineConstraints.Any() && part.IsCatchAll)
Microsoft.AspNetCore.Routing.Tests (68)
InlineRouteParameterParserTests.cs (58)
24Assert.Empty(templatePart.InlineConstraints); 36Assert.Empty(templatePart.InlineConstraints); 48var constraint = Assert.Single(templatePart.InlineConstraints); 61var constraint = Assert.Single(templatePart.InlineConstraints); 74Assert.Empty(templatePart.InlineConstraints); 87var constraint = Assert.Single(templatePart.InlineConstraints); 101var constraint = Assert.Single(templatePart.InlineConstraints); 115var constraint = Assert.Single(templatePart.InlineConstraints); 130var constraint = Assert.Single(templatePart.InlineConstraints); 145var constraint = Assert.Single(templatePart.InlineConstraints); 159var constraint = Assert.Single(templatePart.InlineConstraints); 175var constraint = Assert.Single(templatePart.InlineConstraints); 188Assert.Collection(templatePart.InlineConstraints, 202Assert.Collection(templatePart.InlineConstraints, 218Assert.Collection(templatePart.InlineConstraints, 234Assert.Collection(templatePart.InlineConstraints, 250Assert.Collection(templatePart.InlineConstraints, 269var constraint = Assert.Single(templatePart.InlineConstraints); 287Assert.Collection(param1.InlineConstraints, 332var constraint = Assert.Single(templatePart.InlineConstraints); 347var constraint = Assert.Single(templatePart.InlineConstraints); 360var constraint = Assert.Single(templatePart.InlineConstraints); 375var constraint = Assert.Single(templatePart.InlineConstraints); 388var constraint = Assert.Single(templatePart.InlineConstraints); 403var constraint = Assert.Single(templatePart.InlineConstraints); 416var constraint = Assert.Single(templatePart.InlineConstraints); 431var constraint = Assert.Single(templatePart.InlineConstraints); 446Assert.Collection(templatePart.InlineConstraints, 460Assert.Collection(templatePart.InlineConstraints, 474var constraint = Assert.Single(templatePart.InlineConstraints); 487var constraint = Assert.Single(templatePart.InlineConstraints); 502var constraint = Assert.Single(templatePart.InlineConstraints); 518var constraint = Assert.Single(templatePart.InlineConstraints); 532var constraint = Assert.Single(templatePart.InlineConstraints); 557var constraint = Assert.Single(templatePart.InlineConstraints); 571var constraint = Assert.Single(templatePart.InlineConstraints); 629var constraint = Assert.Single(templatePart.InlineConstraints); 642var constraint = Assert.Single(templatePart.InlineConstraints); 655var constraint = Assert.Single(templatePart.InlineConstraints); 670var constraint = Assert.Single(templatePart.InlineConstraints); 683var constraint = Assert.Single(templatePart.InlineConstraints); 696var constraint = Assert.Single(templatePart.InlineConstraints); 709var constraint = Assert.Single(templatePart.InlineConstraints); 722Assert.Collection(templatePart.InlineConstraints, 737Assert.Collection(templatePart.InlineConstraints, 753var constraint = Assert.Single(templatePart.InlineConstraints); 768var constraint = Assert.Single(templatePart.InlineConstraints); 783var constraint = Assert.Single(templatePart.InlineConstraints); 798var constraint = Assert.Single(templatePart.InlineConstraints); 813var constraint = Assert.Single(templatePart.InlineConstraints); 828var constraint = Assert.Single(templatePart.InlineConstraints); 843var constraint = Assert.Single(templatePart.InlineConstraints); 858Assert.Collection(templatePart.InlineConstraints, 874var constraint = Assert.Single(templatePart.InlineConstraints); 889var constraint = Assert.Single(templatePart.InlineConstraints); 904var constraint = Assert.Single(templatePart.InlineConstraints); 919var constraint = Assert.Single(templatePart.InlineConstraints); 940Assert.Empty(templatePart.InlineConstraints);
Template\TemplateParserTests.cs (10)
874(x.InlineConstraints == null && y.InlineConstraints != null) || 875(x.InlineConstraints != null && y.InlineConstraints == null)) 880if (x.InlineConstraints == null && y.InlineConstraints == null) 885if (x.InlineConstraints.Count() != y.InlineConstraints.Count()) 890foreach (var xconstraint in x.InlineConstraints) 892if (!y.InlineConstraints.Any<InlineConstraint>(