Table of Contents

Class RouteSegment

Namespace
Artemis.UI.Shared.Routing
Assembly
Artemis.UI.Shared.dll

Represents a segment of a route.

public class RouteSegment
Inheritance
object
RouteSegment

Constructors

RouteSegment(string)

Initializes a new instance of the RouteSegment class.

public RouteSegment(string segment)

Parameters

segment string

The segment value.

Properties

Parameter

Gets the parameter name if the segment is a parameterized segment; otherwise null.

public string? Parameter { get; }

Property Value

string

ParameterType

Gets the type of the parameter if the segment is a parameterized segment; otherwise null.

public string? ParameterType { get; }

Property Value

string

Segment

Gets the segment value.

public string Segment { get; }

Property Value

string

Methods

GetParameter(string)

Gets the parameter value from the provided value.

public object? GetParameter(string value)

Parameters

value string

The 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

value string

The value to compare with the segment.

Returns

bool

true if the segment matches the value; otherwise, false.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.