Sisk

Class

RouterModule

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

Indicates that extended class supports router modules, which allows the management of routes, request handlers and prefixes.

C#
public abstract class RouterModule

Inheritance #

object ← RouterModule

Inherited Members #

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
RouterModule()

Properties #

NameDescription
PrefixGets or sets the router prefix for this class. This property overrides any value defined by RoutePrefixAttribute set in this class.
RequestHandlersGets or sets an list of IRequestHandler this RouterModule runs.

Methods #

NameDescription
HasPrefix(string)Specifies a prefix for all routes defined by this module.
HasRequestHandler(IRequestHandler)Registers an IRequestHandler on all routes defined by this module.
OnRouteCreating(Route)This method is called before a route is defined in the router and after it is created in this class, so its attributes and parameters can be modified. This method must be overloaded in the extending class and must not be called directly.
OnSetup(Router)Method that is called when an Router is defining routes from the current RouterModule.

Type to search the documentation and the API reference.