Class StaticSegment
Static segments. The static segment will be created by the RouteParser when the route contains a value without 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 StaticSegment : SegmentBase, ISegment
Constructors
StaticSegment(String)
Initializes a new instance of the StaticSegment class.
Declaration
public StaticSegment(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The 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 |
System.Web.Routing.RouteValueDictionary | values | Route values |
Returns
Type | Description |
---|---|
System.String | Virtual path from this segement. |
Overrides
Remarks
The virtual path of this segment is the same as it's name.
RouteDataMatch(SegmentContext)
Remove the segment from the remaining Path, if the segment matches the url. When route data match, ramaining path will be changed.
Declaration
public override bool RouteDataMatch(SegmentContext context)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | context | Segment context |
Returns
Type | Description |
---|---|
System.Boolean | True if the segment matches the url |