Sisk

Method

Router.MatchRouteExpression

Namespace
Sisk.Core.Routing
Assembly
Sisk.Core.dll

MatchRouteExpression(in ReadOnlySpan<char>, in ReadOnlySpan<char>, StringComparison) #

Attempts to match the specified route expression against the given path.

C#
public static RouteMatch MatchRouteExpression(in ReadOnlySpan<char> routeExpression, in ReadOnlySpan<char> path, StringComparison stringComparer = StringComparison.Ordinal)

Parameters #

routeExpression ReadOnlySpan<char>

The route expression to match.

path ReadOnlySpan<char>

The path to match against the route expression.

stringComparer StringComparison

The string comparison to use when matching the route expression. Defaults to Ordinal.

Returns #

RouteMatch

A RouteMatch object indicating the result of the match.

MatchRouteExpression(string, string, StringComparison) #

Attempts to match the specified route expression against the given path.

C#
public static RouteMatch MatchRouteExpression(string routeExpression, string path, StringComparison stringComparer = StringComparison.Ordinal)

Parameters #

routeExpression string

The route expression to match.

path string

The path to match against the route expression.

stringComparer StringComparison

The string comparison to use when matching the route expression. Defaults to Ordinal.

Returns #

RouteMatch

A RouteMatch object indicating the result of the match.

Type to search the documentation and the API reference.