Class RouteAttribute
Represents an class that, when applied to a method, will be recognized by a router as a route.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class RouteAttribute : Attribute
- Inheritance
-
RouteAttribute
- Derived
- Inherited Members
Constructors
- RouteAttribute(RouteMethod, string)
Creates an new RouteAttribute instance with given route method and path pattern.
Properties
- 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.
- 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.