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