Class RouteSegment
Represents a segment of a route.
public class RouteSegment
- Inheritance
-
objectRouteSegment
Constructors
RouteSegment(string)
Initializes a new instance of the RouteSegment class.
public RouteSegment(string segment)
Parameters
segmentstringThe segment value.
Properties
Parameter
Gets the parameter name if the segment is a parameterized segment; otherwise null.
public string? Parameter { get; }
Property Value
ParameterType
Gets the type of the parameter if the segment is a parameterized segment; otherwise null.
public string? ParameterType { get; }
Property Value
Segment
Gets the segment value.
public string Segment { get; }
Property Value
Methods
GetParameter(string)
Gets the parameter value from the provided value.
public object? GetParameter(string value)
Parameters
valuestringThe value from which to extract the parameter value.
Returns
- object
The extracted parameter value.
IsMatch(string)
Checks if the segment matches the provided value.
public bool IsMatch(string value)
Parameters
valuestringThe value to compare with the segment.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.