Constructor Route
Route(RouteMethod, string, Delegate?)
Creates an new Route instance with given parameters.
public Route(RouteMethod method, string path, Delegate? action)
Parameters
methodRouteMethodThe matching HTTP method. If it is "Any", the route will just use the path expression to be matched, not the HTTP method.
pathstringThe path expression that will be interpreted by the router and validated by the requests.
actionDelegateThe function that is called after the route is matched with the request.
Route(RouteMethod, string, string?, Delegate?, IRequestHandler[]?)
Creates an new Route instance with given parameters.
public Route(RouteMethod method, string path, string? name, Delegate? action, IRequestHandler[]? handlers)
Parameters
methodRouteMethodThe matching HTTP method. If it is "Any", the route will just use the path expression to be matched, not the HTTP method.
pathstringThe path expression that will be interpreted by the router and validated by the requests.
namestringThe route name. It allows it to be found by other routes and makes it easier to create links.
actionDelegateThe function that is called after the route is matched with the request.
handlersIRequestHandler[]The RequestHandlers to run before the route's Action.
Route()
Creates an new Route instance with no parameters.
public Route()
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語