Class RouteAttribute
Decorate methods within controllers with this attribute in order to make them callable from the Web API Module Method Must match the WebServerModule.
Namespace: EmbedIO.Routing
Syntax
public class RouteAttribute : Attribute
Constructors
RouteAttribute(HttpVerb, String, Boolean)
Initializes a new instance of the RouteAttribute class.
Declaration
public RouteAttribute(HttpVerb verb, string route, bool isBaseRoute = false)
Parameters
Type | Name | Description |
---|---|---|
HttpVerb | verb | The verb. |
String | route | The route. |
Boolean | isBaseRoute | true if this attribute represents a base route; false (the default) if it represents a terminal (non-base) route. |
See Also
Properties
IsBaseRoute
Gets a value indicating whether this attribute represents a base route.
Declaration
public bool IsBaseRoute { get; }
Property Value
Type | Description |
---|---|
Boolean |
Matcher
Gets a RouteMatcher that will match URLs against this attribute's data.
Declaration
public RouteMatcher Matcher { get; }
Property Value
Type | Description |
---|---|
RouteMatcher |
Route
Gets the route handled by a method with this attribute.
Declaration
public string Route { get; }
Property Value
Type | Description |
---|---|
String |
Verb
Gets the HTTP verb handled by a method with this attribute.
Declaration
public HttpVerb Verb { get; }
Property Value
Type | Description |
---|---|
HttpVerb |