Class RouteDescription
Describes a route to use for a module
Inheritance
Inherited Members
Namespace: EPiServer.Shell.Configuration
Assembly: EPiServer.Shell.dll
Version: 9.12.2Syntax
public class RouteDescription
Constructors
RouteDescription()
Initializes a new instance of the RouteDescription class. Will set Url to the default value "{moduleArea}/{controller}/{action}/{id}".
Declaration
public RouteDescription()
Properties
Constraints
Gets or sets a collection of key/value pairs defining valid values for URL parameters.
Declaration
public List<KeyValueElement> Constraints { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyValueElement> |
ControllerPrefix
A prefix applied to to all controllers routed to this route. This makes it possible to "scope" controllers so they don't conflict with application controllers.
Declaration
public string ControllerPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DataTokens
Gets or sets custom values that are passed to the route handler, but which are not used to determine whether the route matches a URL pattern.
Declaration
public List<KeyValueElement> DataTokens { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyValueElement> |
Defaults
Gets or sets the values to use if the URL does not contain all the parameters.
Declaration
public List<KeyValueElement> Defaults { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyValueElement> |
Type
Gets or sets an optional class for routing. The class must inherit System.Web.Routing.RouteBase.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Url
The URL pattern for the route.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Defaults to
{moduleArea}/{controller}/{action}/{id}
if not set.
Methods
TrimControllerName(String)
Removes the ControllerPrefix from the beginning of the controller name and "Controller" from the end.
Declaration
public string TrimControllerName(string controllerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | controllerName | The controller type name to trim. |
Returns
Type | Description |
---|---|
System.String | A leaner controller name. |