Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoVirtualPageRoute

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

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Web.Common.Routing
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public class UmbracoVirtualPageRoute : IUmbracoVirtualPageRoute

    Constructors

    View Source

    UmbracoVirtualPageRoute(EndpointDataSource, LinkParser, UriUtility, IPublishedRouter)

    Constructor.

    Declaration
    public UmbracoVirtualPageRoute(EndpointDataSource endpointDataSource, LinkParser linkParser, UriUtility uriUtility, IPublishedRouter publishedRouter)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Routing.EndpointDataSource endpointDataSource

    The endpoint data source.

    Microsoft.AspNetCore.Routing.LinkParser linkParser

    The link parser.

    UriUtility uriUtility

    The Uri utility.

    IPublishedRouter publishedRouter

    The published router.

    Methods

    View Source

    CreatePublishedRequest(HttpContext, IPublishedContent)

    Creates the published request for the published content.

    Declaration
    public async 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.

    View Source

    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
    public 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
    System.Nullable<IPublishedContent>
    View Source

    FindContent(Endpoint, ActionExecutingContext)

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

    Declaration
    public 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
    System.Nullable<IPublishedContent>

    The published content if found or null.

    View Source

    SetRouteValues(HttpContext, IPublishedContent, ControllerActionDescriptor)

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

    Declaration
    public async 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.

    View Source

    SetupVirtualPageRoute(HttpContext)

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

    Declaration
    public async Task SetupVirtualPageRoute(HttpContext httpContext)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.HttpContext httpContext

    The HTTP context.

    Returns
    Type Description
    Task

    Nothing

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UmbracoVirtualPageRoute(EndpointDataSource, LinkParser, UriUtility, IPublishedRouter)
    • Methods
      • CreatePublishedRequest(HttpContext, IPublishedContent)
      • FindContent(Endpoint, HttpContext, RouteValueDictionary, ControllerActionDescriptor, Object)
      • FindContent(Endpoint, ActionExecutingContext)
      • SetRouteValues(HttpContext, IPublishedContent, ControllerActionDescriptor)
      • SetupVirtualPageRoute(HttpContext)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX