Class ContentRoute

Inheritance
System.Object
ContentRoute
Implements
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
[Obsolete("Use IContentRoute (or IContentRouteEvents for events)", true)]
public class ContentRoute : Route, IContentRoute

Constructors

ContentRoute(IRouteHandler, ISegment[], RouteValueDictionary, RouteValueDictionary, SupportedDirection, Func<RequestContext, RouteValueDictionary, String>, IViewRegistrator, IUpdateCurrentLanguage, RouteRedirector, VirtualPathHostResolver, IContentRouteEventsRaiser, ServiceAccessor<RoutingOptions>)

Declaration
public ContentRoute(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

Declaration
[Obsolete("Use IContentRoute.Name instead")]
public string Name { get; set; }
Property Value
Type Description
System.String

StrictLanguageRoutingResolver

Declaration
public Func<bool> StrictLanguageRoutingResolver { get; set; }
Property Value
Type Description
System.Func<System.Boolean>

Url

Declaration
public string Url { get; set; }
Property Value
Type Description
System.String

UseTrailingSlash

Declaration
[Obsolete("Setting should be set on RoutingOptions instance retreived from IOC")]
public static bool UseTrailingSlash { get; set; }
Property Value
Type Description
System.Boolean

Methods

FirstIncomingRequest(HttpContextBase)

Declaration
protected virtual void FirstIncomingRequest(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

GetRouteData(HttpContextBase)

Declaration
public override RouteData GetRouteData(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext
Returns
Type Description
System.Web.Routing.RouteData

GetValue(String, RequestContext, RouteValueDictionary)

Declaration
[Obsolete("Use requestContext.GetRouteValue instead (GetRouteValue is an extension method on RequestContext)")]
public static object GetValue(string name, RequestContext requestContext, RouteValueDictionary values)
Parameters
Type Name Description
System.String name
System.Web.Routing.RequestContext requestContext
System.Web.Routing.RouteValueDictionary values
Returns
Type Description
System.Object

GetVirtualPath(RequestContext, RouteValueDictionary)

Declaration
public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext
System.Web.Routing.RouteValueDictionary values
Returns
Type Description
System.Web.Routing.VirtualPathData

IsDirectionSupported(SupportedDirection)

Declaration
public bool IsDirectionSupported(SupportedDirection direction)
Parameters
Type Name Description
SupportedDirection direction
Returns
Type Description
System.Boolean

MatchConstraints(SegmentContext, HttpContextBase)

Declaration
public bool MatchConstraints(SegmentContext segmentContext, HttpContextBase context)
Parameters
Type Name Description
SegmentContext segmentContext
System.Web.HttpContextBase context
Returns
Type Description
System.Boolean

OnCreatingVirtualPath(RequestContext)

Declaration
protected virtual void OnCreatingVirtualPath(RequestContext requestContext)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

OnCreatingVirtualPath(RequestContext, RouteValueDictionary)

Declaration
protected virtual void OnCreatingVirtualPath(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext
System.Web.Routing.RouteValueDictionary values

OnRoutedContent(RoutingEventArgs)

Declaration
protected virtual void OnRoutedContent(RoutingEventArgs routingEventArgs)
Parameters
Type Name Description
RoutingEventArgs routingEventArgs

OnRoutingContent(RoutingEventArgs)

Declaration
protected virtual void OnRoutingContent(RoutingEventArgs routingEventArgs)
Parameters
Type Name Description
RoutingEventArgs routingEventArgs

OnVirtualPathCreated(UrlBuilder)

Declaration
protected virtual void OnVirtualPathCreated(UrlBuilder virtualPathBuilder)
Parameters
Type Name Description
UrlBuilder virtualPathBuilder

OnVirtualPathCreated(UrlBuilder, RequestContext, RouteValueDictionary)

Declaration
protected virtual void OnVirtualPathCreated(UrlBuilder virtualPathBuilder, RequestContext requestContext, RouteValueDictionary routeValues)
Parameters
Type Name Description
UrlBuilder virtualPathBuilder
System.Web.Routing.RequestContext requestContext
System.Web.Routing.RouteValueDictionary routeValues

RouteSegmentContext(SegmentContext)

Declaration
public virtual RouteData RouteSegmentContext(SegmentContext segmentContext)
Parameters
Type Name Description
SegmentContext segmentContext
Returns
Type Description
System.Web.Routing.RouteData

Events

CreatedVirtualPath

Declaration
[Obsolete("Use IContentRouteEvents.CreatedVirtualPath instead")]
public static event EventHandler<UrlBuilderEventArgs> CreatedVirtualPath
Event Type
Type Description
System.EventHandler<UrlBuilderEventArgs>

CreatingVirtualPath

Declaration
[Obsolete("Use IContentRouteEvents.CreatingVirtualPath instead")]
public static event EventHandler<RequestContextEventArgs> CreatingVirtualPath
Event Type
Type Description
System.EventHandler<RequestContextEventArgs>

RoutedContent

Declaration
[Obsolete("Use IContentRouteEvents.RoutedContent instead")]
public static event EventHandler<RoutingEventArgs> RoutedContent
Event Type
Type Description
System.EventHandler<RoutingEventArgs>

RoutingContent

Declaration
[Obsolete("Use IContentRouteEvents.RoutingContent instead")]
public static event EventHandler<RoutingEventArgs> RoutingContent
Event Type
Type Description
System.EventHandler<RoutingEventArgs>

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

Implements

Extension Methods