3 instantiations of RoutePattern
Microsoft.AspNetCore.Routing (3)
Patterns\DefaultRoutePatternTransformer.cs (1)
188
return new
RoutePattern
(
Patterns\RoutePatternFactory.cs (2)
533
return new
RoutePattern
(
1098
return new
RoutePattern
(rawText, defaults, parameterPolicies, requiredValues, parameters, pathSegments);
167 references to RoutePattern
Microsoft.AspNetCore.Mvc.Abstractions (1)
ApiExplorer\ApiDescription.cs (1)
49
public
RoutePattern
? RoutePattern { get; set; }
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (4)
174
var
pattern = routeEndpoint.RoutePattern;
202
private static ParameterDescriptor CreateParameterDescriptor(ParameterInfo parameter,
RoutePattern
pattern)
214
private ApiParameterRouteInfo? CreateParameterRouteInfo(
RoutePattern
pattern, ParameterInfo parameter, bool isOptional)
253
var
pattern = routeEndpoint.RoutePattern;
Microsoft.AspNetCore.Mvc.Core (12)
Routing\ActionEndpointDataSourceBase.cs (1)
65
RoutePattern
? groupPrefix,
Routing\ActionEndpointFactory.cs (9)
48
RoutePattern
? groupPrefix = null)
93
var
updatedRoutePattern = _routePatternTransformer.SubstituteRequiredValues(route.Pattern, action.RouteValues);
130
var
attributeRoutePattern = RoutePatternFactory.Parse(action.AttributeRouteInfo.Template);
136
var
updatedRoutePattern = _routePatternTransformer.SubstituteRequiredValues(resolvedRoutePattern, resolvedRouteValues);
183
RoutePattern
? groupPrefix = null)
195
requiredValues[key] =
RoutePattern
.RequiredValueAny;
209
var
pattern = _routePatternTransformer.SubstituteRequiredValues(route.Pattern, requiredValues);
276
private static (
RoutePattern
resolvedRoutePattern, IDictionary<string, string?> resolvedRequiredValues) ResolveDefaultsAndRequiredValues(ActionDescriptor action,
RoutePattern
attributeRoutePattern)
Routing\ControllerActionEndpointDataSource.cs (1)
66
RoutePattern
? groupPrefix,
Routing\ConventionalRouteEntry.cs (1)
13
public readonly
RoutePattern
Pattern;
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionEndpointDataSource.cs (1)
45
RoutePattern
? groupPrefix,
Microsoft.AspNetCore.Routing (149)
Builder\EndpointRouteBuilderExtensions.cs (5)
49
public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints,
RoutePattern
prefix)
183
RoutePattern
pattern,
191
RoutePattern
pattern,
361
RoutePattern
pattern,
428
RoutePattern
pattern,
EndpointDataSource.cs (1)
54
var
fullRoutePattern = RoutePatternFactory.Combine(context.Prefix, routeEndpoint.RoutePattern);
Matching\DfaMatcherBuilder.cs (1)
980
private static bool TryGetRequiredValue(
RoutePattern
routePattern, RoutePatternParameterPart parameterPart, out object value)
Patterns\DefaultRoutePatternTransformer.cs (7)
23
public override
RoutePattern
SubstituteRequiredValues(
RoutePattern
original, object requiredValues)
30
public override
RoutePattern
SubstituteRequiredValues(
RoutePattern
original, RouteValueDictionary requiredValues)
79
else if (
RoutePattern
.IsRequiredValueAny(kvp.Value))
167
!
RoutePattern
.IsRequiredValueAny(kvp.Value) &&
197
private bool MatchesConstraints(
RoutePattern
pattern, RoutePatternParameterPart parameter, string key, RouteValueDictionary requiredValues)
Patterns\RoutePattern.cs (3)
12
/// Use <see cref="RoutePatternFactory"/> to create <see cref="
RoutePattern
"/>
13
/// instances. Instances of <see cref="
RoutePattern
"/> are immutable.
27
/// <see cref="RequiredValueAny"/> is only use in routing is in <see cref="
RoutePattern
.RequiredValues"/>.
Patterns\RoutePatternDebugStringFormatter.cs (5)
13
public static string Format(
RoutePattern
pattern)
47
private static bool HasMatchingRequiredValues(
RoutePattern
pattern)
65
private static string GetSegmentDebuggerToString(
RoutePattern
pattern, RoutePatternPathSegment segment)
89
private static bool TryGetRequiredValue(
RoutePattern
pattern, string parameterName, [NotNullWhen(true)] out string? value)
93
!
RoutePattern
.IsRequiredValueAny(requiredValue) &&
Patterns\RoutePatternException.cs (1)
11
/// An exception that is thrown for error constructing a <see cref="
RoutePattern
"/>.
Patterns\RoutePatternFactory.cs (67)
24
/// Contains factory methods for creating <see cref="
RoutePattern
"/> and related types.
41
/// Creates a <see cref="
RoutePattern
"/> from its string representation.
44
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
45
public static
RoutePattern
Parse([StringSyntax("Route")] string pattern)
53
/// Creates a <see cref="
RoutePattern
"/> from its string representation along
68
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
70
public static
RoutePattern
Parse([StringSyntax("Route")] string pattern, object? defaults, object? parameterPolicies)
74
var
original = RoutePatternParser.Parse(pattern);
79
/// Creates a <see cref="
RoutePattern
"/> from its string representation along
94
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
95
public static
RoutePattern
Parse([StringSyntax("Route")] string pattern, RouteValueDictionary? defaults, RouteValueDictionary? parameterPolicies)
99
var
original = RoutePatternParser.Parse(pattern);
104
/// Creates a <see cref="
RoutePattern
"/> from its string representation along
120
/// Route values that can be substituted for parameters in the route pattern. See remarks on <see cref="
RoutePattern
.RequiredValues"/>.
122
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
124
public static
RoutePattern
Parse([StringSyntax("Route")] string pattern, object? defaults, object? parameterPolicies, object? requiredValues)
128
var
original = RoutePatternParser.Parse(pattern);
133
/// Creates a <see cref="
RoutePattern
"/> from its string representation along
149
/// Route values that can be substituted for parameters in the route pattern. See remarks on <see cref="
RoutePattern
.RequiredValues"/>.
151
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
152
public static
RoutePattern
Parse([StringSyntax("Route")] string pattern, RouteValueDictionary? defaults, RouteValueDictionary? parameterPolicies, RouteValueDictionary? requiredValues)
156
var
original = RoutePatternParser.Parse(pattern);
161
/// Creates a new instance of <see cref="
RoutePattern
"/> from a collection of segments.
164
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
165
public static
RoutePattern
Pattern(IEnumerable<RoutePatternPathSegment> segments)
173
/// Creates a new instance of <see cref="
RoutePattern
"/> from a collection of segments.
177
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
178
public static
RoutePattern
Pattern(string? rawText, IEnumerable<RoutePatternPathSegment> segments)
187
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
202
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
204
public static
RoutePattern
Pattern(
215
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
230
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
231
public static
RoutePattern
Pattern(
242
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
258
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
260
public static
RoutePattern
Pattern(
272
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
288
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
289
public static
RoutePattern
Pattern(
301
/// Creates a new instance of <see cref="
RoutePattern
"/> from a collection of segments.
304
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
305
public static
RoutePattern
Pattern(params RoutePatternPathSegment[] segments)
313
/// Creates a new instance of <see cref="
RoutePattern
"/> from a collection of segments.
317
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
318
public static
RoutePattern
Pattern(string rawText, params RoutePatternPathSegment[] segments)
326
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
341
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
343
public static
RoutePattern
Pattern(
354
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
369
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
370
public static
RoutePattern
Pattern(
381
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
397
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
399
public static
RoutePattern
Pattern(
411
/// Creates a <see cref="
RoutePattern
"/> from a collection of segments along
427
/// <returns>The <see cref="
RoutePattern
"/>.</returns>
428
public static
RoutePattern
Pattern(
440
private static
RoutePattern
PatternCore(
1026
/// Creates a <see cref="
RoutePattern
"/> that combines the specified patterns.
1030
/// <returns>The combined <see cref="
RoutePattern
"/>.</returns>
1033
public static
RoutePattern
Combine(
RoutePattern
? left,
RoutePattern
right)
1094
var defaults = CombineDictionaries(left.Defaults, right.Defaults, rawText, nameof(
RoutePattern
.Defaults));
1095
var requiredValues = CombineDictionaries(left.RequiredValues, right.RequiredValues, rawText, nameof(
RoutePattern
.RequiredValues));
1096
var parameterPolicies = CombineDictionaries(left.ParameterPolicies, right.ParameterPolicies, rawText, nameof(
RoutePattern
.ParameterPolicies));
Patterns\RoutePatternMatcher.cs (2)
24
RoutePattern
pattern,
61
public
RoutePattern
RoutePattern { get; }
Patterns\RoutePatternParameterPolicyReference.cs (1)
9
/// The parsed representation of a policy in a <see cref="
RoutePattern
"/> parameter. Instances
Patterns\RoutePatternParser.cs (1)
25
public static
RoutePattern
Parse(string pattern)
Patterns\RoutePatternTransformer.cs (13)
9
/// A singleton service that provides transformations on <see cref="
RoutePattern
"/>.
17
/// <param name="original">The original <see cref="
RoutePattern
"/>.</param>
20
/// A new <see cref="
RoutePattern
"/> if substitution succeeds, otherwise <c>null</c>.
26
/// <see cref="SubstituteRequiredValues(
RoutePattern
, object)"/> can produce a derived route pattern
31
/// when examining a required value. <see cref="SubstituteRequiredValues(
RoutePattern
, object)"/> will
37
public abstract
RoutePattern
? SubstituteRequiredValues(
RoutePattern
original, object requiredValues);
43
/// <param name="original">The original <see cref="
RoutePattern
"/>.</param>
46
/// A new <see cref="
RoutePattern
"/> if substitution succeeds, otherwise <c>null</c>.
52
/// <see cref="SubstituteRequiredValues(
RoutePattern
, object)"/> can produce a derived route pattern
57
/// when examining a required value. <see cref="SubstituteRequiredValues(
RoutePattern
, object)"/> will
61
public virtual
RoutePattern
? SubstituteRequiredValues(
RoutePattern
original, RouteValueDictionary requiredValues)
RouteEndpoint.cs (2)
26
RoutePattern
routePattern,
51
public
RoutePattern
RoutePattern { get; }
RouteEndpointBuilder.cs (3)
22
public
RoutePattern
RoutePattern { get; set; }
37
RoutePattern
routePattern,
63
private static EndpointMetadataCollection CreateMetadataCollection(IList<object> metadata,
RoutePattern
routePattern)
RouteEndpointDataSource.cs (6)
34
RoutePattern
pattern,
60
RoutePattern
pattern,
130
RouteEntry entry,
RoutePattern
? groupPrefix = null, IReadOnlyList<Action<EndpointBuilder>>? groupConventions = null, IReadOnlyList<Action<EndpointBuilder>>? groupFinallyConventions = null)
132
var
pattern = RoutePatternFactory.Combine(groupPrefix, entry.RoutePattern);
289
private RequestDelegateFactoryOptions CreateRdfOptions(RouteEntry entry,
RoutePattern
pattern, RouteEndpointBuilder builder)
341
public required
RoutePattern
RoutePattern { get; init; }
RouteGroupBuilder.cs (6)
15
/// <see cref="EndpointRouteBuilderExtensions.MapGroup(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder,
RoutePattern
)"/>
21
private readonly
RoutePattern
_partialPrefix;
27
internal RouteGroupBuilder(IEndpointRouteBuilder outerEndpointRouteBuilder,
RoutePattern
partialPrefix)
58
RoutePattern
? prefix,
89
RoutePattern
? prefix,
94
var
fullPrefix = RoutePatternFactory.Combine(prefix, _routeGroupBuilder._partialPrefix);
RouteGroupContext.cs (4)
17
/// not just the prefix supplied to the innermost call to <see cref="EndpointRouteBuilderExtensions.MapGroup(IEndpointRouteBuilder,
RoutePattern
)"/>.
19
public required
RoutePattern
Prefix { get; init; }
22
/// Gets all conventions added to ancestor <see cref="RouteGroupBuilder"/> instances returned from <see cref="EndpointRouteBuilderExtensions.MapGroup(IEndpointRouteBuilder,
RoutePattern
)"/>
29
/// Gets all conventions added to ancestor <see cref="RouteGroupBuilder"/> instances returned from <see cref="EndpointRouteBuilderExtensions.MapGroup(IEndpointRouteBuilder,
RoutePattern
)"/>
Template\DefaultTemplateBinderFactory.cs (1)
34
public override TemplateBinder Create(
RoutePattern
pattern)
Template\RoutePrecedence.cs (3)
58
internal static decimal ComputeInbound(
RoutePattern
routePattern)
112
internal static decimal ComputeOutbound(
RoutePattern
routePattern)
249
internal static int ComputeInboundPrecedenceDigit(
RoutePattern
routePattern, RoutePatternPathSegment pathSegment)
Template\RouteTemplate.cs (5)
23
/// <param name="other">A <see cref="
RoutePattern
"/> instance.</param>
24
public RouteTemplate(
RoutePattern
other)
134
/// <see cref="
RoutePattern
"/>
136
/// <returns>A <see cref="
RoutePattern
"/>.</returns>
137
public
RoutePattern
ToRoutePattern()
Template\TemplateBinder.cs (7)
28
private readonly
RoutePattern
_pattern;
57
/// <param name="pattern">The <see cref="
RoutePattern
"/> to bind values to.</param>
66
RoutePattern
pattern,
98
RoutePattern
pattern,
228
!
RoutePattern
.IsRequiredValueAny(_pattern.RequiredValues[key]))
315
(RoutePartsEqual(requiredValue, ambientValue) ||
RoutePattern
.IsRequiredValueAny(requiredValue)))
720
private static KeyValuePair<string, object?>[] AssignSlots(
RoutePattern
pattern, KeyValuePair<string, object?>[] filters)
Template\TemplateBinderFactory.cs (2)
25
/// <param name="pattern">The <see cref="
RoutePattern
"/>.</param>
27
public abstract TemplateBinder Create(
RoutePattern
pattern);
Template\TemplateMatcher.cs (1)
60
var
routePattern = Template.ToRoutePattern();
Template\TemplateParser.cs (1)
24
var
inner = RoutePatternFactory.Parse(routeTemplate);
Tree\LinkGenerationDecisionTree.cs (1)
45
if (
RoutePattern
.IsRequiredValueAny(kvp.Value))