Table of Contents

Class Route

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

Represents an HTTP route to be matched by an Router object.

public class Route
Inheritance
Route
Derived
Inherited Members

Constructors

Route()

Creates an new Route instance with no parameters.

Route(RouteMethod, string, RouteAction)

Creates an new Route instance with given parameters.

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

Creates an new Route instance with given parameters.

Fields

AnyPath

Represents an route path which captures any URL path.

Properties

Action

Gets or sets the function that is called after the route is matched with the request.

Bag

Gets or sets an TypedValueDictionary for this route, which can hold contextual variables for this Route object.

BypassGlobalRequestHandlers

Gets or sets the global request handlers instances that will not run on this route.

IsAsync

Gets an boolean indicating if this Route action return is an asynchronous Task.

LogMode

Gets or sets how this route can write messages to log files on the server.

Method

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

Name

Gets or sets the route name. It allows it to be found by other routes and makes it easier to create links.

Path

Gets or sets the path expression that will be interpreted by the router and validated by the requests.

RequestHandlers

Gets or sets the request handlers instances to run before the route's Action.

UseCors

Gets or sets whether this route should send Cross-Origin Resource Sharing headers in the response.

UseRegex

Get or sets if this route should use regex to be interpreted instead of predefined templates.

Methods

ToString()

Gets an string notation for this Route object.