Interface IUmbracoVirtualPageRoute
This is used to setup the virtual page route so the route values and content are set for virtual pages.
Namespace: Umbraco.Cms.Web.Common.Routing
Assembly: Umbraco.Web.Common.dll
Syntax
public interface IUmbracoVirtualPageRoute
Methods
View SourceCreatePublishedRequest(HttpContext, IPublishedContent)
Creates the published request for the published content.
Declaration
Task<IPublishedRequest> CreatePublishedRequest(HttpContext httpContext, IPublishedContent publishedContent)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | httpContext | The HTTP context. |
IPublishedContent | publishedContent | The published content. |
Returns
Type | Description |
---|---|
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).
Declaration
IPublishedContent FindContent(Endpoint endpoint, HttpContext httpContext, RouteValueDictionary routeValues, ControllerActionDescriptor controllerActionDescriptor, object controller)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.Endpoint | endpoint | The endpoint. |
Microsoft.AspNetCore.Http.HttpContext | httpContext | The HTTP context. |
Microsoft.AspNetCore.Routing.RouteValueDictionary | routeValues | The route values. |
Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor | controllerActionDescriptor | The action descriptor. |
System.Object | controller | The controller. |
Returns
Type | Description |
---|---|
IPublishedContent |
FindContent(Endpoint, ActionExecutingContext)
Finds the content from the custom route finder delegate or the virtual page controller.
Declaration
IPublishedContent FindContent(Endpoint endpoint, ActionExecutingContext actionExecutingContext)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.Endpoint | endpoint | The endpoint. |
Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext | actionExecutingContext | The action executing context. |
Returns
Type | Description |
---|---|
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.
Declaration
Task SetRouteValues(HttpContext httpContext, IPublishedContent publishedContent, ControllerActionDescriptor controllerActionDescriptor)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | httpContext | The HTTP context. |
IPublishedContent | publishedContent | The published content. |
Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor | controllerActionDescriptor | The controller action descriptor. |
Returns
Type | Description |
---|---|
Task | Nothing. |
SetupVirtualPageRoute(HttpContext)
This sets up the virtual page route for the current request if a mtahcing endpoint is found.
Declaration
Task SetupVirtualPageRoute(HttpContext httpContext)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | httpContext | The HTTP context. |
Returns
Type | Description |
---|---|
Task | Nothing |