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