1 write to ParameterPolicies
Microsoft.AspNetCore.Routing (1)
Patterns\RoutePatternParameterPart.cs (1)
42
ParameterPolicies
= parameterPolicies;
97 references to ParameterPolicies
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (3)
213
Assert.True(routeParameter.Policies.Length == parsedRoutePattern.
ParameterPolicies
.Count, "ParameterPolicies");
214
for (var i = 0; i < parsedRoutePattern.
ParameterPolicies
.Count; i++)
216
var expected = parsedRoutePattern.
ParameterPolicies
[i].Content;
Microsoft.AspNetCore.Mvc.Core (1)
Routing\RoutePatternWriter.cs (1)
46
foreach (var item in parameterPart.
ParameterPolicies
)
Microsoft.AspNetCore.Routing (10)
Patterns\DefaultRoutePatternTransformer.cs (1)
228
var updatedParameter = RoutePatternFactory.ParameterPart(parameter.Name, @default: null, parameter.ParameterKind, parameter.
ParameterPolicies
);
Patterns\RoutePatternFactory.cs (5)
610
parameter.
ParameterPolicies
.Count > 0)
617
parameterConstraints = new List<RoutePatternParameterPolicyReference>(parameter.
ParameterPolicies
.Count);
621
if (parameter.
ParameterPolicies
.Count > 0)
623
parameterConstraints!.AddRange(parameter.
ParameterPolicies
);
627
&& parameter.
ParameterPolicies
.Count == 0
Patterns\RoutePatternParameterPart.cs (1)
99
foreach (var constraint in
ParameterPolicies
)
Template\RoutePrecedence.cs (2)
194
if (parameterPart.
ParameterPolicies
.Count > 0)
276
if (parameterPart.
ParameterPolicies
.Count > 0)
Template\TemplatePart.cs (1)
44
InlineConstraints = parameter.
ParameterPolicies
?.Select(p => new InlineConstraint(p)) ?? Enumerable.Empty<InlineConstraint>();
Microsoft.AspNetCore.Routing.Tests (83)
DefaultParameterPolicyFactoryTest.cs (5)
65
var parameterPolicy = factory.Create(parameter, parameter.
ParameterPolicies
[0]);
84
var parameterPolicy = factory.Create(parameter, parameter.
ParameterPolicies
[0]);
104
var parameterPolicy = factory.Create(parameter, parameter.
ParameterPolicies
[0]);
123
var parameterPolicy = factory.Create(parameter, parameter.
ParameterPolicies
[0]);
143
var parameterPolicy = factory.Create(parameter, parameter.
ParameterPolicies
[0]);
Patterns\InlineRouteParameterParserTest.cs (62)
19
Assert.Empty(templatePart.
ParameterPolicies
);
31
Assert.Empty(templatePart.
ParameterPolicies
);
43
Assert.Empty(templatePart.
ParameterPolicies
);
55
Assert.Empty(templatePart.
ParameterPolicies
);
67
Assert.Empty(templatePart.
ParameterPolicies
);
80
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
94
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
108
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
123
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
138
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
152
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
168
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
181
Assert.Collection(templatePart.
ParameterPolicies
,
196
templatePart.
ParameterPolicies
,
210
Assert.Collection(templatePart.
ParameterPolicies
,
226
Assert.Collection(templatePart.
ParameterPolicies
,
243
templatePart.
ParameterPolicies
,
261
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
279
Assert.Collection(param1.
ParameterPolicies
,
324
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
339
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
352
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
367
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
380
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
395
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
408
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
423
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
439
templatePart.
ParameterPolicies
,
453
templatePart.
ParameterPolicies
,
466
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
479
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
494
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
510
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
524
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
549
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
563
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
621
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
634
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
647
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
662
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
675
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
688
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
701
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
714
Assert.Collection(templatePart.
ParameterPolicies
,
729
Assert.Collection(templatePart.
ParameterPolicies
,
745
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
760
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
775
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
790
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
805
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
820
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
835
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
850
Assert.Collection(templatePart.
ParameterPolicies
,
866
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
881
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
896
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
911
var constraint = Assert.Single(templatePart.
ParameterPolicies
);
933
Assert.Empty(templatePart.
ParameterPolicies
);
978
var constraintReference = Assert.Single(parameterPart.
ParameterPolicies
);
996
var constraintReference = Assert.Single(parameterPart.
ParameterPolicies
);
1042
var constraintReference = Assert.Single(parameterPart.
ParameterPolicies
);
1059
var constraintReference = Assert.Single(parameterPart.
ParameterPolicies
);
Patterns\RoutePatternFactoryTest.cs (14)
155
actual.GetParameter("a").
ParameterPolicies
,
159
actual.GetParameter("b").
ParameterPolicies
,
633
var policies = routePatternParameterPart.
ParameterPolicies
.ToArray();
641
Assert.NotNull(parameterPart.
ParameterPolicies
);
642
Assert.Equal(3, parameterPart.
ParameterPolicies
.Count);
643
Assert.NotNull(parameterPart.
ParameterPolicies
[0]);
644
Assert.NotNull(parameterPart.
ParameterPolicies
[1]);
645
Assert.NotNull(parameterPart.
ParameterPolicies
[2]);
660
var policies = routePatternParameterPart.
ParameterPolicies
.ToList();
668
Assert.NotNull(parameterPart.
ParameterPolicies
);
669
Assert.Equal(3, parameterPart.
ParameterPolicies
.Count);
670
Assert.NotNull(parameterPart.
ParameterPolicies
[0]);
671
Assert.NotNull(parameterPart.
ParameterPolicies
[1]);
672
Assert.NotNull(parameterPart.
ParameterPolicies
[2]);
Patterns\RoutePatternParserTest.cs (2)
732
Enumerable.SequenceEqual(x.
ParameterPolicies
, y.
ParameterPolicies
, this);