Sisk

Class

RouteAttribute

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

Represents an class that, when applied to a method, will be recognized by a router as a route.

C#
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class RouteAttribute : Attribute

Inheritance #

object ← Attribute ← RouteAttribute

Derived #

RegexRouteAttribute, RouteDeleteAttribute, RouteGetAttribute, RoutePatchAttribute, RoutePostAttribute, RoutePutAttribute, RouteQueryAttribute

Inherited Members #

Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.Equals(object?), Attribute.GetHashCode(), Attribute.Match(object?), Attribute.IsDefaultAttribute(), Attribute.TypeId, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
RouteAttribute(RouteMethod, string)Creates an new RouteAttribute instance with given route method and path pattern.

Properties #

NameDescription
LogModeGets or sets how this route can write messages to log files on the server.
MethodGets 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.
NameGets or sets the route name. It allows it to be found by other routes and makes it easier to create links.
PathGets or sets the path expression that will be interpreted by the router and validated by the requests.
UseCorsGets or sets whether this route should send Cross-Origin Resource Sharing headers in the response.
UseRegexGet or sets if this route should use regex to be interpreted instead of predefined templates.

Type to search the documentation and the API reference.