Table of Contents

Constructor Route

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

Route(RouteMethod, string, RouteAction)

Creates an new Route instance with given parameters.

public Route(RouteMethod method, string path, RouteAction action)

Parameters

method RouteMethod

The matching HTTP method. If it is "Any", the route will just use the path expression to be matched, not the HTTP method.

path string

The path expression that will be interpreted by the router and validated by the requests.

action RouteAction

The function that is called after the route is matched with the request.

Route(RouteMethod, string, string?, RouteAction, IRequestHandler[]?)

Creates an new Route instance with given parameters.

public Route(RouteMethod method, string path, string? name, RouteAction action, IRequestHandler[]? beforeCallback)

Parameters

method RouteMethod

The matching HTTP method. If it is "Any", the route will just use the path expression to be matched, not the HTTP method.

path string

The path expression that will be interpreted by the router and validated by the requests.

name string

The route name. It allows it to be found by other routes and makes it easier to create links.

action RouteAction

The function that is called after the route is matched with the request.

beforeCallback IRequestHandler[]

The RequestHandlers to run before the route's Action.

Route()

Creates an new Route instance with no parameters.

public Route()