Class ParameterSegment
Custom segments. The parameter segment will be created by the RouteParser when the route contains a custom action inside curly brackets.
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Routing.Segments
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class ParameterSegment : SegmentBase, ISegment
Constructors
ParameterSegment(String)
Initializes a new instance of the ParameterSegment class.
Declaration
public ParameterSegment(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the segment. |
Methods
GetVirtualPathSegment(RequestContext, RouteValueDictionary)
Gets the string representation of this segments virtual path.
Declaration
public override string GetVirtualPathSegment(RequestContext requestContext, RouteValueDictionary values)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RequestContext | requestContext | The request context |
System.Web.Routing.RouteValueDictionary | values | Route values |
Returns
Type | Description |
---|---|
System.String | Virtual path from this segment |
Overrides
Remarks
Will return null if values
does not contain this segments Name
RouteDataMatch(SegmentContext)
Set the parameter in the value list, if a value exist in the url, or as a default If the value exist, the value gets removed from the remaining path.
Declaration
public override bool RouteDataMatch(SegmentContext context)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | context | RoutingContext |
Returns
Type | Description |
---|---|
System.Boolean | True if value exist in url or as a default |