Table of Contents

Interface IUmbracoVirtualPageRoute

Namespace
Umbraco.Cms.Web.Common.Routing
Assembly
Umbraco.Web.Common.dll

This is used to setup the virtual page route so the route values and content are set for virtual pages.

public interface IUmbracoVirtualPageRoute

Methods

CreatePublishedRequest(HttpContext, IPublishedContent)

Creates the published request for the published content.

Task<IPublishedRequest> CreatePublishedRequest(HttpContext httpContext, IPublishedContent publishedContent)

Parameters

httpContext HttpContext

The HTTP context.

publishedContent IPublishedContent

The published content.

Returns

Task<IPublishedRequest>

The published request.

FindContent(Endpoint, HttpContext, RouteValueDictionary, ControllerActionDescriptor, object)

Finds the content from the custom route finder delegate or the virtual page controller. Note - This creates a dummay action executing context so the FindContent method of the IVirtualPageController can be called (without changing the interface contract).

IPublishedContent? FindContent(Endpoint endpoint, HttpContext httpContext, RouteValueDictionary routeValues, ControllerActionDescriptor controllerActionDescriptor, object controller)

Parameters

endpoint Endpoint

The endpoint.

httpContext HttpContext

The HTTP context.

routeValues RouteValueDictionary

The route values.

controllerActionDescriptor ControllerActionDescriptor

The action descriptor.

controller object

The controller.

Returns

IPublishedContent

FindContent(Endpoint, ActionExecutingContext)

Finds the content from the custom route finder delegate or the virtual page controller.

IPublishedContent? FindContent(Endpoint endpoint, ActionExecutingContext actionExecutingContext)

Parameters

endpoint Endpoint

The endpoint.

actionExecutingContext ActionExecutingContext

The action executing context.

Returns

IPublishedContent

The published content if found or null.

SetRouteValues(HttpContext, IPublishedContent, ControllerActionDescriptor)

Sets the route values for the published content and the controller action descriptor.

Task SetRouteValues(HttpContext httpContext, IPublishedContent publishedContent, ControllerActionDescriptor controllerActionDescriptor)

Parameters

httpContext HttpContext

The HTTP context.

publishedContent IPublishedContent

The published content.

controllerActionDescriptor ControllerActionDescriptor

The controller action descriptor.

Returns

Task

Nothing.

SetupVirtualPageRoute(HttpContext)

This sets up the virtual page route for the current request if a mtahcing endpoint is found.

Task SetupVirtualPageRoute(HttpContext httpContext)

Parameters

httpContext HttpContext

The HTTP context.

Returns

Task

Nothing