Class DefaultContentRoute
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. A route that maps an url to a structure node. When the node corresponds to a controller this the controller route value is set, otherwise the route is assumed to be a web form route.
Inheritance
Implements
Namespace: EPiServer.Web.Routing.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class DefaultContentRoute : Route, IContentRoute
Constructors
DefaultContentRoute(IRouteHandler, ISegment[], RouteValueDictionary, RouteValueDictionary, SupportedDirection, Func<RequestContext, RouteValueDictionary, String>, IViewRegistrator, IUpdateCurrentLanguage, RouteRedirector, VirtualPathHostResolver, IContentRouteEventsRaiser, ServiceAccessor<RoutingOptions>)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the DefaultContentRoute class.
Declaration
public DefaultContentRoute(IRouteHandler routeHandler, ISegment[] urlSegments, RouteValueDictionary defaults, RouteValueDictionary constraints, SupportedDirection supportedDirection, Func<RequestContext, RouteValueDictionary, string> basePathResolver, IViewRegistrator viewRegistrator, IUpdateCurrentLanguage updateCurrentLanguage, RouteRedirector routeRedirector, VirtualPathHostResolver virtualPathHostResolver, IContentRouteEventsRaiser eventsRaiser, ServiceAccessor<RoutingOptions> routingOptionsAccessor)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.IRouteHandler | routeHandler | |
ISegment[] | urlSegments | |
System.Web.Routing.RouteValueDictionary | defaults | |
System.Web.Routing.RouteValueDictionary | constraints | |
SupportedDirection | supportedDirection | |
System.Func<System.Web.Routing.RequestContext, System.Web.Routing.RouteValueDictionary, System.String> | basePathResolver | |
IViewRegistrator | viewRegistrator | |
IUpdateCurrentLanguage | updateCurrentLanguage | |
RouteRedirector | routeRedirector | |
VirtualPathHostResolver | virtualPathHostResolver | |
IContentRouteEventsRaiser | eventsRaiser | |
ServiceAccessor<RoutingOptions> | routingOptionsAccessor |
Properties
Name
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the name that this DefaultContentRoute instance was registered with.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
StrictLanguageRoutingResolver
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the strict language handling resolver.
Declaration
public Func<bool> StrictLanguageRoutingResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Boolean> | The strict language handling resolver. |
Remarks
This is exposed for testability purpose. At runtime it returns StrictLanguageRouting
Url
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Hides the possibility to use the 'Url' property in the Route since we do not want to use it.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
FirstIncomingRequest(HttpContextBase)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when the firsts incoming request comes to the page route.
Declaration
protected virtual void FirstIncomingRequest(HttpContextBase httpContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContextBase | httpContext | The HTTP context. |
GetRouteData(HttpContextBase)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Incoming Routing
Declaration
public override RouteData GetRouteData(HttpContextBase httpContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContextBase | httpContext | Context |
Returns
Type | Description |
---|---|
System.Web.Routing.RouteData | RouteData from the incoming request |
GetVirtualPath(RequestContext, RouteValueDictionary)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Outgoing Routing
Declaration
public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RequestContext | requestContext | Context |
System.Web.Routing.RouteValueDictionary | values | Route values |
Returns
Type | Description |
---|---|
System.Web.Routing.VirtualPathData | Virtual path |
IsDirectionSupported(SupportedDirection)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Determines whether this instance supports requested route direction.
Declaration
public bool IsDirectionSupported(SupportedDirection direction)
Parameters
Type | Name | Description |
---|---|---|
SupportedDirection | direction | The direction. |
Returns
Type | Description |
---|---|
System.Boolean |
|
MatchConstraints(SegmentContext, HttpContextBase)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Checks if all constrains matches the route
Declaration
public bool MatchConstraints(SegmentContext segmentContext, HttpContextBase context)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | segmentContext | The segment context. |
System.Web.HttpContextBase | context | The context. |
Returns
Type | Description |
---|---|
System.Boolean |
OnCreatingVirtualPath(RequestContext, RouteValueDictionary)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called to raise CreatingVirtualPath event.
Declaration
protected virtual void OnCreatingVirtualPath(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RequestContext | requestContext | The request context. |
System.Web.Routing.RouteValueDictionary | values | The route values. |
OnRoutedContent(RoutingEventArgs)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called to raise RoutedContent event.
Declaration
protected virtual void OnRoutedContent(RoutingEventArgs routingEventArgs)
Parameters
Type | Name | Description |
---|---|---|
RoutingEventArgs | routingEventArgs | The RoutingEventArgs instance containing the event data. |
OnRoutingContent(RoutingEventArgs)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called to raise RoutingContent event.
Declaration
protected virtual void OnRoutingContent(RoutingEventArgs routingEventArgs)
Parameters
Type | Name | Description |
---|---|---|
RoutingEventArgs | routingEventArgs | The RoutingEventArgs instance containing the event data. |
OnVirtualPathCreated(UrlBuilder, RequestContext, RouteValueDictionary)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Called to raise CreatedVirtualPath event.
Declaration
protected virtual void OnVirtualPathCreated(UrlBuilder virtualPathBuilder, RequestContext requestContext, RouteValueDictionary routeValues)
Parameters
Type | Name | Description |
---|---|---|
UrlBuilder | virtualPathBuilder | The virtual path builder. |
System.Web.Routing.RequestContext | requestContext | The request context. |
System.Web.Routing.RouteValueDictionary | routeValues | The route values. |
RouteSegmentContext(SegmentContext)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to route the specified segmentContext
to an content instance.
Declaration
public virtual RouteData RouteSegmentContext(SegmentContext segmentContext)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | segmentContext | The segment context. |
Returns
Type | Description |
---|---|
System.Web.Routing.RouteData | RouteData if routing succeds else null |
Explicit Interface Implementations
IContentRoute.get_Defaults()
Declaration
RouteValueDictionary IContentRoute.get_Defaults()
Returns
Type | Description |
---|---|
System.Web.Routing.RouteValueDictionary |
IContentRoute.set_Defaults(RouteValueDictionary)
Declaration
void IContentRoute.set_Defaults(RouteValueDictionary value)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RouteValueDictionary | value |