2 writes to Constraint
Microsoft.AspNetCore.Routing (2)
Template\InlineConstraint.cs (2)
25Constraint = constraint; 36Constraint = other.Content!;
76 references to Constraint
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
351constraints.Add(_constraintResolver.ResolveConstraint(constraint.Constraint)!);
Microsoft.AspNetCore.Routing (4)
RouteBase.cs (1)
228constraintBuilder.AddResolvedConstraint(parameter.Name!, inlineConstraint.Constraint);
Template\TemplatePart.cs (1)
173var constraints = InlineConstraints.Select(c => new RoutePatternParameterPolicyReference(c.Constraint));
Tree\TreeRouteBuilder.cs (2)
126constraintBuilder.AddResolvedConstraint(parameter.Name, constraint.Constraint); 212constraintBuilder.AddResolvedConstraint(parameter.Name, constraint.Constraint);
Microsoft.AspNetCore.Routing.Tests (71)
InlineRouteParameterParserTests.cs (69)
49Assert.Empty(constraint.Constraint); 62Assert.Empty(constraint.Constraint); 88Assert.Equal("int", constraint.Constraint); 102Assert.Equal(@"test(\d+)", constraint.Constraint); 116Assert.Equal("int", constraint.Constraint); 131Assert.Equal("int", constraint.Constraint); 146Assert.Equal("int", constraint.Constraint); 160Assert.Equal(@"test(\d+)", constraint.Constraint); 176Assert.Equal(@"test(\d+)", constraint.Constraint); 189constraint => Assert.Equal(@"test(d+)", constraint.Constraint), 190constraint => Assert.Equal(@"test(w+)", constraint.Constraint)); 203constraint => Assert.Empty(constraint.Constraint), 204constraint => Assert.Equal(@"test(d+)", constraint.Constraint), 205constraint => Assert.Empty(constraint.Constraint), 206constraint => Assert.Equal(@"test(w+)", constraint.Constraint)); 219constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 220constraint => Assert.Equal(@"test(\w:+)", constraint.Constraint)); 235constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 236constraint => Assert.Equal(@"test(\w+)", constraint.Constraint)); 251constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 252constraint => Assert.Empty(constraint.Constraint), 253constraint => Assert.Equal(@"test(\w+)", constraint.Constraint)); 270Assert.Equal("length(6)", constraint.Constraint); 288constraint => Assert.Equal("int", constraint.Constraint), 289constraint => Assert.Equal("test(3)", constraint.Constraint) 333Assert.Equal(@"test(\})", constraint.Constraint); 348Assert.Equal(@"test(\})", constraint.Constraint); 361Assert.Equal(@"test(\))", constraint.Constraint); 376Assert.Equal(@"test(\))", constraint.Constraint); 389Assert.Equal(@"test(:)", constraint.Constraint); 404Assert.Equal(@"test(:)", constraint.Constraint); 417Assert.Equal(@"test(a:b:c)", constraint.Constraint); 432Assert.Equal("test", constraint.Constraint); 447constraint => Assert.Empty(constraint.Constraint), 448constraint => Assert.Equal("test", constraint.Constraint)); 461constraint => Assert.Equal("test", constraint.Constraint), 462constraint => Assert.Empty(constraint.Constraint)); 475Assert.Equal(@"test(\w,\w)", constraint.Constraint); 488Assert.Equal(@"test(\w)", constraint.Constraint); 503Assert.Equal(@"test(\w,\w)", constraint.Constraint); 519Assert.Equal("int", constraint.Constraint); 533Assert.Equal("test(=)", constraint.Constraint); 558Assert.Equal("test(a==b)", constraint.Constraint); 572Assert.Equal("test(a==b)", constraint.Constraint); 630Assert.Equal("test(=)", constraint.Constraint); 643Assert.Equal(@"test(\{)", constraint.Constraint); 656Assert.Equal(@"test(\sd)", constraint.Constraint); 671Assert.Equal(@"test(\{)", constraint.Constraint); 684Assert.Equal(@"test(\()", constraint.Constraint); 697Assert.Equal(@"test(\()", constraint.Constraint); 710Assert.Equal("test(#$%", constraint.Constraint); 723constraint => Assert.Equal(@"test(#", constraint.Constraint), 724constraint => Assert.Equal(@"test1", constraint.Constraint)); 738constraint => Assert.Equal(@"test(abc:somevalue)", constraint.Constraint), 739constraint => Assert.Equal(@"name(test1", constraint.Constraint), 740constraint => Assert.Equal(@"differentname", constraint.Constraint)); 754Assert.Equal(@"test(constraintvalue", constraint.Constraint); 769Assert.Equal(@"test(\()", constraint.Constraint); 784Assert.Equal(@"test(\?)", constraint.Constraint); 799Assert.Equal(@"test(\?)", constraint.Constraint); 814Assert.Equal(@"test(\?)", constraint.Constraint); 829Assert.Equal(@"test(\?)", constraint.Constraint); 844Assert.Equal(@"test(\?)", constraint.Constraint); 859constraint => Assert.Equal(@"test(#)", constraint.Constraint), 860constraint => Assert.Equal(@"$)", constraint.Constraint)); 875Assert.Equal(@"test(#:)$)", constraint.Constraint); 890Assert.Equal(@"regex(\\(\\(\\(\\()", constraint.Constraint); 905Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Constraint); 920Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Constraint);
Template\TemplateParserTests.cs (2)
893c => string.Equals(c.Constraint, xconstraint.Constraint, StringComparison.Ordinal)))