3 instantiations of RoutePattern
Microsoft.AspNetCore.Routing (3)
Patterns\DefaultRoutePatternTransformer.cs (1)
188return new RoutePattern(
Patterns\RoutePatternFactory.cs (2)
533return new RoutePattern( 1098return new RoutePattern(rawText, defaults, parameterPolicies, requiredValues, parameters, pathSegments);
167 references to RoutePattern
Microsoft.AspNetCore.Mvc.Abstractions (1)
ApiExplorer\ApiDescription.cs (1)
49public RoutePattern? RoutePattern { get; set; }
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (4)
174var pattern = routeEndpoint.RoutePattern; 202private static ParameterDescriptor CreateParameterDescriptor(ParameterInfo parameter, RoutePattern pattern) 214private ApiParameterRouteInfo? CreateParameterRouteInfo(RoutePattern pattern, ParameterInfo parameter, bool isOptional) 253var pattern = routeEndpoint.RoutePattern;
Microsoft.AspNetCore.Mvc.Core (12)
Routing\ActionEndpointDataSourceBase.cs (1)
65RoutePattern? groupPrefix,
Routing\ActionEndpointFactory.cs (9)
48RoutePattern? groupPrefix = null) 93var updatedRoutePattern = _routePatternTransformer.SubstituteRequiredValues(route.Pattern, action.RouteValues); 130var attributeRoutePattern = RoutePatternFactory.Parse(action.AttributeRouteInfo.Template); 136var updatedRoutePattern = _routePatternTransformer.SubstituteRequiredValues(resolvedRoutePattern, resolvedRouteValues); 183RoutePattern? groupPrefix = null) 195requiredValues[key] = RoutePattern.RequiredValueAny; 209var pattern = _routePatternTransformer.SubstituteRequiredValues(route.Pattern, requiredValues); 276private static (RoutePattern resolvedRoutePattern, IDictionary<string, string?> resolvedRequiredValues) ResolveDefaultsAndRequiredValues(ActionDescriptor action, RoutePattern attributeRoutePattern)
Routing\ControllerActionEndpointDataSource.cs (1)
66RoutePattern? groupPrefix,
Routing\ConventionalRouteEntry.cs (1)
13public readonly RoutePattern Pattern;
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionEndpointDataSource.cs (1)
45RoutePattern? groupPrefix,
Microsoft.AspNetCore.Routing (149)
Builder\EndpointRouteBuilderExtensions.cs (5)
49public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints, RoutePattern prefix) 183RoutePattern pattern, 191RoutePattern pattern, 361RoutePattern pattern, 428RoutePattern pattern,
EndpointDataSource.cs (1)
54var fullRoutePattern = RoutePatternFactory.Combine(context.Prefix, routeEndpoint.RoutePattern);
Matching\DfaMatcherBuilder.cs (1)
980private static bool TryGetRequiredValue(RoutePattern routePattern, RoutePatternParameterPart parameterPart, out object value)
Patterns\DefaultRoutePatternTransformer.cs (7)
23public override RoutePattern SubstituteRequiredValues(RoutePattern original, object requiredValues) 30public override RoutePattern SubstituteRequiredValues(RoutePattern original, RouteValueDictionary requiredValues) 79else if (RoutePattern.IsRequiredValueAny(kvp.Value)) 167!RoutePattern.IsRequiredValueAny(kvp.Value) && 197private 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)
13public static string Format(RoutePattern pattern) 47private static bool HasMatchingRequiredValues(RoutePattern pattern) 65private static string GetSegmentDebuggerToString(RoutePattern pattern, RoutePatternPathSegment segment) 89private 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> 45public 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> 70public static RoutePattern Parse([StringSyntax("Route")] string pattern, object? defaults, object? parameterPolicies) 74var original = RoutePatternParser.Parse(pattern); 79/// Creates a <see cref="RoutePattern"/> from its string representation along 94/// <returns>The <see cref="RoutePattern"/>.</returns> 95public static RoutePattern Parse([StringSyntax("Route")] string pattern, RouteValueDictionary? defaults, RouteValueDictionary? parameterPolicies) 99var 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> 124public static RoutePattern Parse([StringSyntax("Route")] string pattern, object? defaults, object? parameterPolicies, object? requiredValues) 128var 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> 152public static RoutePattern Parse([StringSyntax("Route")] string pattern, RouteValueDictionary? defaults, RouteValueDictionary? parameterPolicies, RouteValueDictionary? requiredValues) 156var 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> 165public 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> 178public 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> 204public static RoutePattern Pattern( 215/// Creates a <see cref="RoutePattern"/> from a collection of segments along 230/// <returns>The <see cref="RoutePattern"/>.</returns> 231public static RoutePattern Pattern( 242/// Creates a <see cref="RoutePattern"/> from a collection of segments along 258/// <returns>The <see cref="RoutePattern"/>.</returns> 260public static RoutePattern Pattern( 272/// Creates a <see cref="RoutePattern"/> from a collection of segments along 288/// <returns>The <see cref="RoutePattern"/>.</returns> 289public static RoutePattern Pattern( 301/// Creates a new instance of <see cref="RoutePattern"/> from a collection of segments. 304/// <returns>The <see cref="RoutePattern"/>.</returns> 305public 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> 318public 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> 343public static RoutePattern Pattern( 354/// Creates a <see cref="RoutePattern"/> from a collection of segments along 369/// <returns>The <see cref="RoutePattern"/>.</returns> 370public static RoutePattern Pattern( 381/// Creates a <see cref="RoutePattern"/> from a collection of segments along 397/// <returns>The <see cref="RoutePattern"/>.</returns> 399public static RoutePattern Pattern( 411/// Creates a <see cref="RoutePattern"/> from a collection of segments along 427/// <returns>The <see cref="RoutePattern"/>.</returns> 428public static RoutePattern Pattern( 440private static RoutePattern PatternCore( 1026/// Creates a <see cref="RoutePattern"/> that combines the specified patterns. 1030/// <returns>The combined <see cref="RoutePattern"/>.</returns> 1033public static RoutePattern Combine(RoutePattern? left, RoutePattern right) 1094var defaults = CombineDictionaries(left.Defaults, right.Defaults, rawText, nameof(RoutePattern.Defaults)); 1095var requiredValues = CombineDictionaries(left.RequiredValues, right.RequiredValues, rawText, nameof(RoutePattern.RequiredValues)); 1096var parameterPolicies = CombineDictionaries(left.ParameterPolicies, right.ParameterPolicies, rawText, nameof(RoutePattern.ParameterPolicies));
Patterns\RoutePatternMatcher.cs (2)
24RoutePattern pattern, 61public 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)
25public 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 37public 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 61public virtual RoutePattern? SubstituteRequiredValues(RoutePattern original, RouteValueDictionary requiredValues)
RouteEndpoint.cs (2)
26RoutePattern routePattern, 51public RoutePattern RoutePattern { get; }
RouteEndpointBuilder.cs (3)
22public RoutePattern RoutePattern { get; set; } 37RoutePattern routePattern, 63private static EndpointMetadataCollection CreateMetadataCollection(IList<object> metadata, RoutePattern routePattern)
RouteEndpointDataSource.cs (6)
34RoutePattern pattern, 60RoutePattern pattern, 130RouteEntry entry, RoutePattern? groupPrefix = null, IReadOnlyList<Action<EndpointBuilder>>? groupConventions = null, IReadOnlyList<Action<EndpointBuilder>>? groupFinallyConventions = null) 132var pattern = RoutePatternFactory.Combine(groupPrefix, entry.RoutePattern); 289private RequestDelegateFactoryOptions CreateRdfOptions(RouteEntry entry, RoutePattern pattern, RouteEndpointBuilder builder) 341public required RoutePattern RoutePattern { get; init; }
RouteGroupBuilder.cs (6)
15/// <see cref="EndpointRouteBuilderExtensions.MapGroup(Microsoft.AspNetCore.Routing.IEndpointRouteBuilder, RoutePattern)"/> 21private readonly RoutePattern _partialPrefix; 27internal RouteGroupBuilder(IEndpointRouteBuilder outerEndpointRouteBuilder, RoutePattern partialPrefix) 58RoutePattern? prefix, 89RoutePattern? prefix, 94var 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)"/>. 19public 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)
34public override TemplateBinder Create(RoutePattern pattern)
Template\RoutePrecedence.cs (3)
58internal static decimal ComputeInbound(RoutePattern routePattern) 112internal static decimal ComputeOutbound(RoutePattern routePattern) 249internal static int ComputeInboundPrecedenceDigit(RoutePattern routePattern, RoutePatternPathSegment pathSegment)
Template\RouteTemplate.cs (5)
23/// <param name="other">A <see cref="RoutePattern"/> instance.</param> 24public RouteTemplate(RoutePattern other) 134/// <see cref="RoutePattern"/> 136/// <returns>A <see cref="RoutePattern"/>.</returns> 137public RoutePattern ToRoutePattern()
Template\TemplateBinder.cs (7)
28private readonly RoutePattern _pattern; 57/// <param name="pattern">The <see cref="RoutePattern"/> to bind values to.</param> 66RoutePattern pattern, 98RoutePattern pattern, 228!RoutePattern.IsRequiredValueAny(_pattern.RequiredValues[key])) 315(RoutePartsEqual(requiredValue, ambientValue) || RoutePattern.IsRequiredValueAny(requiredValue))) 720private static KeyValuePair<string, object?>[] AssignSlots(RoutePattern pattern, KeyValuePair<string, object?>[] filters)
Template\TemplateBinderFactory.cs (2)
25/// <param name="pattern">The <see cref="RoutePattern"/>.</param> 27public abstract TemplateBinder Create(RoutePattern pattern);
Template\TemplateMatcher.cs (1)
60var routePattern = Template.ToRoutePattern();
Template\TemplateParser.cs (1)
24var inner = RoutePatternFactory.Parse(routeTemplate);
Tree\LinkGenerationDecisionTree.cs (1)
45if (RoutePattern.IsRequiredValueAny(kvp.Value))