Class RouteParser
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Parses a route into an array of ISegment.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Web.Routing.Internal
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
[ServiceConfiguration(ServiceType = typeof(IRouteParser))]
public class RouteParser : IRouteParser
Constructors
RouteParser()
Declaration
public RouteParser()
Methods
Parse(String, IDictionary<String, ISegment>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Parses the specified URL into segments.
Declaration
public ISegment[] Parse(string url, IDictionary<string, ISegment> segmentMappings)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL to parse. |
System.Collections.Generic.IDictionary<System.String, ISegment> | segmentMappings | The dictionary to use when mapping segments. |
Returns
Type | Description |
---|---|
ISegment[] | An array of segments corresponding to the sections of |
Remarks
Will split the incoming url on '/' to create different sections.
The sections will each be matched against segmentMappings
to add the matching ISegment to the return array.
If no match is found it will add an instance of ParameterSegment.
If a section contains no curly braces an instance of StaticSegment will be added.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When a specific segment is invalid. |