Table of Contents

Constructor Route

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

Route(RouteMethod, string, Delegate?)

Creates an new Route instance with given parameters.

public Route(RouteMethod method, string path, Delegate? 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 Delegate?

The 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

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 Delegate?

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

handlers IRequestHandler[]?

The RequestHandlers to run before the route's Action.

Route()

Creates an new Route instance with no parameters.

public Route()