52 references to RoutePatternParameterKind
Microsoft.AspNetCore.Routing (29)
Patterns\RouteParameterParser.cs (6)
22
return new RoutePatternParameterPart(string.Empty, null,
RoutePatternParameterKind
.Standard, Array.Empty<RoutePatternParameterPolicyReference>());
29
var
parameterKind =
RoutePatternParameterKind
.Standard;
34
parameterKind =
RoutePatternParameterKind
.CatchAll;
39
parameterKind =
RoutePatternParameterKind
.CatchAll;
45
parameterKind =
RoutePatternParameterKind
.Optional;
Patterns\RoutePatternFactory.cs (10)
781
parameterKind:
RoutePatternParameterKind
.Standard,
804
parameterKind:
RoutePatternParameterKind
.Standard,
819
RoutePatternParameterKind
parameterKind)
828
if (@default != null && parameterKind ==
RoutePatternParameterKind
.Optional)
852
RoutePatternParameterKind
parameterKind,
862
if (@default != null && parameterKind ==
RoutePatternParameterKind
.Optional)
888
RoutePatternParameterKind
parameterKind,
898
if (@default != null && parameterKind ==
RoutePatternParameterKind
.Optional)
915
RoutePatternParameterKind
parameterKind,
925
RoutePatternParameterKind
parameterKind,
Patterns\RoutePatternParameterKind.cs (3)
16
/// The <see cref="
RoutePatternParameterKind
"/> of a standard parameter
22
/// The <see cref="
RoutePatternParameterKind
"/> of an optional parameter.
27
/// The <see cref="
RoutePatternParameterKind
"/> of a catch-all parameter.
Patterns\RoutePatternParameterPart.cs (6)
23
RoutePatternParameterKind
parameterKind,
32
RoutePatternParameterKind
parameterKind,
65
public bool IsCatchAll => ParameterKind ==
RoutePatternParameterKind
.CatchAll;
71
public bool IsOptional => ParameterKind ==
RoutePatternParameterKind
.Optional;
74
/// Gets the <see cref="
RoutePatternParameterKind
"/> of this parameter.
76
public
RoutePatternParameterKind
ParameterKind { get; }
Template\TemplatePart.cs (4)
167
var
kind = IsCatchAll ?
168
RoutePatternParameterKind
.CatchAll :
170
RoutePatternParameterKind
.Optional :
171
RoutePatternParameterKind
.Standard;
Microsoft.AspNetCore.Routing.Tests (23)
DefaultParameterPolicyFactoryTest.cs (9)
22
() => factory.Create(RoutePatternFactory.ParameterPart("id", @default: null,
RoutePatternParameterKind
.Optional), @"notpresent(\d+)"));
61
parameterKind:
RoutePatternParameterKind
.Standard,
80
parameterKind:
RoutePatternParameterKind
.Optional,
100
parameterKind:
RoutePatternParameterKind
.Standard,
119
parameterKind:
RoutePatternParameterKind
.Optional,
139
parameterKind:
RoutePatternParameterKind
.Standard,
184
var parameterPolicy = factory.Create(RoutePatternFactory.ParameterPart("id", @default: null,
RoutePatternParameterKind
.Optional), "int");
204
var parameterPolicy = factory.Create(RoutePatternFactory.ParameterPart("id", @default: null,
RoutePatternParameterKind
.Optional), "customParameterPolicy");
393
var parameterPolicy = factory.Create(RoutePatternFactory.ParameterPart("id", @default: null,
RoutePatternParameterKind
.Optional), "customParameterPolicy");
Patterns\InlineRouteParameterParserTest.cs (4)
946
Assert.Equal(
RoutePatternParameterKind
.CatchAll, parameterPart.ParameterKind);
961
Assert.Equal(
RoutePatternParameterKind
.CatchAll, parameterPart.ParameterKind);
977
Assert.Equal(
RoutePatternParameterKind
.CatchAll, parameterPart.ParameterKind);
995
Assert.Equal(
RoutePatternParameterKind
.CatchAll, parameterPart.ParameterKind);
Patterns\RoutePatternFactoryTest.cs (2)
636
var parameterPart = RoutePatternFactory.ParameterPart(name, defaults,
RoutePatternParameterKind
.Standard, policies);
663
var parameterPart = RoutePatternFactory.ParameterPart(name, defaults,
RoutePatternParameterKind
.Standard, policies);
Patterns\RoutePatternParserTest.cs (8)
50
var expected = Pattern(template, Segment(ParameterPart("p", null,
RoutePatternParameterKind
.Optional)));
88
Segment(ParameterPart("p3", null,
RoutePatternParameterKind
.CatchAll)));
186
ParameterPart("p2", null,
RoutePatternParameterKind
.Optional)));
228
ParameterPart("p3", null,
RoutePatternParameterKind
.Optional)));
270
ParameterPart("p2", null,
RoutePatternParameterKind
.Optional)),
294
ParameterPart("p3", null,
RoutePatternParameterKind
.Optional)));
314
ParameterPart("p3", null,
RoutePatternParameterKind
.Optional)));
338
RoutePatternParameterKind
.Standard,