Class UmbracoVirtualPageRoute
This is used to setup the virtual page route so the route values and content are set for virtual pages.
public class UmbracoVirtualPageRoute : IUmbracoVirtualPageRoute
- Inheritance
-
UmbracoVirtualPageRoute
- Implements
- Inherited Members
Constructors
UmbracoVirtualPageRoute(EndpointDataSource, LinkParser, UriUtility, IPublishedRouter)
Constructor.
public UmbracoVirtualPageRoute(EndpointDataSource endpointDataSource, LinkParser linkParser, UriUtility uriUtility, IPublishedRouter publishedRouter)
Parameters
endpointDataSourceEndpointDataSourceThe endpoint data source.
linkParserLinkParserThe link parser.
uriUtilityUriUtilityThe Uri utility.
publishedRouterIPublishedRouterThe published router.
Methods
CreatePublishedRequest(HttpContext, IPublishedContent)
Creates the published request for the published content.
public Task<IPublishedRequest> CreatePublishedRequest(HttpContext httpContext, IPublishedContent publishedContent)
Parameters
httpContextHttpContextThe HTTP context.
publishedContentIPublishedContentThe 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).
public IPublishedContent? FindContent(Endpoint endpoint, HttpContext httpContext, RouteValueDictionary routeValues, ControllerActionDescriptor controllerActionDescriptor, object controller)
Parameters
endpointEndpointThe endpoint.
httpContextHttpContextThe HTTP context.
routeValuesRouteValueDictionaryThe route values.
controllerActionDescriptorControllerActionDescriptorThe action descriptor.
controllerobjectThe controller.
Returns
- IPublishedContent
FindContent(Endpoint, ActionExecutingContext)
Finds the content from the custom route finder delegate or the virtual page controller.
public IPublishedContent? FindContent(Endpoint endpoint, ActionExecutingContext actionExecutingContext)
Parameters
endpointEndpointThe endpoint.
actionExecutingContextActionExecutingContextThe 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.
public Task SetRouteValues(HttpContext httpContext, IPublishedContent publishedContent, ControllerActionDescriptor controllerActionDescriptor)
Parameters
httpContextHttpContextThe HTTP context.
publishedContentIPublishedContentThe published content.
controllerActionDescriptorControllerActionDescriptorThe 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.
public Task SetupVirtualPageRoute(HttpContext httpContext)
Parameters
httpContextHttpContextThe HTTP context.
Returns
- Task
Nothing