Constructor RegexRoute
RegexRoute(RouteMethod, string, RouteAction)
Initializes a new instance of the RegexRoute class.
public RegexRoute(RouteMethod method, string pattern, RouteAction action)
Parameters
method
RouteMethodThe HTTP method for this route.
pattern
stringThe regular expression pattern for this route.
action
RouteActionThe action to be executed when this route is matched.
RegexRoute(RouteMethod, string, string?, RouteAction, IRequestHandler[]?)
Initializes a new instance of the RegexRoute class.
public RegexRoute(RouteMethod method, string pattern, string? name, RouteAction action, IRequestHandler[]? beforeCallback)
Parameters
method
RouteMethodThe HTTP method for this route.
pattern
stringThe regular expression pattern for this route.
name
stringThe name of this route.
action
RouteActionThe action to be executed when this route is matched.
beforeCallback
IRequestHandler[]The callback to be executed before the action.