November Happy Hour will be moved to Thursday December 5th.

Class MultiplexingRouteHandler

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Represents a System.Web.Routing.IRouteHandler that can handle request to both webforms and MVC.

Inheritance
System.Object
MultiplexingRouteHandler
Implements
System.Web.Routing.IRouteHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Routing.Internal
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(ServiceType = typeof(IRouteHandler))]
public class MultiplexingRouteHandler : IRouteHandler

Constructors

MultiplexingRouteHandler(IContentLoader, IPermanentLinkMapper, TemplateResolver, IUpdateCurrentLanguage, LocalizationService, LanguageResolver)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the MultiplexingRouteHandler class.

Declaration
public MultiplexingRouteHandler(IContentLoader contentLoader, IPermanentLinkMapper permanentLinkMapper, TemplateResolver templateResolver, IUpdateCurrentLanguage updateCurrentLanguage, LocalizationService current, LanguageResolver languageResolver)
Parameters
Type Name Description
IContentLoader contentLoader

The content loader.

IPermanentLinkMapper permanentLinkMapper

The IPermanentLinkMapper used in GetRouteHandler(RequestContext).

TemplateResolver templateResolver

The control resolver to use to resolve which template or controller that should handle the request.

IUpdateCurrentLanguage updateCurrentLanguage

The language selection implementation.

LocalizationService current

The localization service to use

LanguageResolver languageResolver

The language resolver.

Fields

PageRouteHandlerCreator

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Specifies the delegate used to create PageRouteHandler instances

Declaration
public Func<string, bool, PageRouteHandler> PageRouteHandlerCreator
Field Value
Type Description
System.Func<System.String, System.Boolean, System.Web.Routing.PageRouteHandler>

Properties

TemplateResolver

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the template resolver.

Declaration
protected TemplateResolver TemplateResolver { get; }
Property Value
Type Description
TemplateResolver

The template resolver.

Translator

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the translator that is used to translate string resources.

Declaration
public LocalizationService Translator { get; set; }
Property Value
Type Description
LocalizationService

The translator.

Methods

GetHttpHandler(RequestContext)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the http handler from the specified requestContext.

Declaration
public IHttpHandler GetHttpHandler(RequestContext requestContext)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

The request context

Returns
Type Description
System.Web.IHttpHandler

IHttpHandler from System.Web.Mvc.MvcRouteHandler or System.Web.Routing.PageRouteHandler.

Remarks

Will get the http handler from the System.Web.Routing.IRouteHandler returned by GetRouteHandler(RequestContext).

GetPageRouteHandler(Object, String, String, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the page route handler for a web form.

Declaration
protected virtual PageRouteHandler GetPageRouteHandler(object routedData, string path, string language, bool return404)
Parameters
Type Name Description
System.Object routedData

The routed data.

System.String path

The path.

System.String language

The language.

System.Boolean return404

if set to true then a 404 HttpException is raised

Returns
Type Description
System.Web.Routing.PageRouteHandler

GetRouteHandler(RequestContext)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Returns a route handler for MVC or webforms.

Declaration
public virtual IRouteHandler GetRouteHandler(RequestContext requestContext)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

The request context

Returns
Type Description
System.Web.Routing.IRouteHandler

An instance of System.Web.Mvc.MvcRouteHandler if a controller is found among routed values in requestContext. Otherwise return an instance of System.Web.Routing.PageRouteHandler.

GetRouteHandlerOrRedirect(RequestContext, Object, Boolean)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the route handler for the request or redirects the request in case RedirectIfNeeded(RequestContext, PageData) returns true.

Declaration
protected virtual IRouteHandler GetRouteHandlerOrRedirect(RequestContext requestContext, object routedData, bool throw404IfNotFound)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

The request context.

System.Object routedData

The content.

System.Boolean throw404IfNotFound

if set to true a 404 HttpException is thrown if no page is found else null is returned.

Returns
Type Description
System.Web.Routing.IRouteHandler

RedirectIfNeeded(RequestContext, PageData)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Redirects the request if the page is an external shortcut or does not have a trailing slash.

Declaration
protected virtual void RedirectIfNeeded(RequestContext requestContext, PageData page)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

The request context.

PageData page

The page.

Implements

System.Web.Routing.IRouteHandler

Extension Methods