Class OutgoingOnlyRoute
Route that only supports outgoing routing, that is creating virtual paths. Purpose of it is to support HtmlHelper methods Action and RenderAction but prevent direct browsing for registered url like for example {controller}/{action/
Inheritance
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class OutgoingOnlyRoute : RouteBase
Constructors
OutgoingOnlyRoute(String, IRouteHandler)
Initializes a new instance of the OutgoingOnlyRoute class.
Declaration
public OutgoingOnlyRoute(string url, IRouteHandler routeHandler)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL. |
System.Web.Routing.IRouteHandler | routeHandler | The route handler. |
Methods
GetRouteData(HttpContextBase)
When overridden in a derived class, returns route information about the request.
Declaration
public override RouteData GetRouteData(HttpContextBase httpContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContextBase | httpContext | An object that encapsulates information about the HTTP request. |
Returns
Type | Description |
---|---|
System.Web.Routing.RouteData | An object that contains the values from the route definition if the route matches the current request, or null if the route does not match the request. |
Remarks
Implementation will always return null.
GetVirtualPath(RequestContext, RouteValueDictionary)
When overridden in a derived class, checks whether the route matches the specified values, and if so, generates a URL and retrieves information about the route.
Declaration
public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RequestContext | requestContext | An object that encapsulates information about the requested route. |
System.Web.Routing.RouteValueDictionary | values | An object that contains the parameters for a route. |
Returns
Type | Description |
---|---|
System.Web.Routing.VirtualPathData | An object that contains the generated URL and information about the route, or null if the route does not match |