RouteAttribute
Used to decorate Request DTO's to associate a RESTful request path mapping with a service. Multiple attributes can be applied to each request DTO, to map multiple paths to the service.
Assembly: ServiceStack.Interfaces.dll
View Source
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class RouteAttribute : AttributeBase, _Attribute, IReflectAttributeConverter
Properties
Path
Gets or sets the path template to be mapped to the request.
View Source
public string Path { get; set; }
Summary
Gets or sets short summary of what the route does.
View Source
public string Summary { get; set; }
Notes
Gets or sets longer text to explain the behaviour of the route.
View Source
public string Notes { get; set; }
Verbs
Gets or sets a comma-delimited list of HTTP verbs supported by the service, such as "GET,PUT,POST,DELETE".
View Source
public string Verbs { get; set; }
Priority
Used to rank the precedences of route definitions in reverse routing. i.e. Priorities below 0 are auto-generated have less precedence.
View Source
public int Priority { get; set; }
Matches
Must match rule defined in Config.RequestRules or Regex expression with format: "{IHttpRequest.Field} =~ {pattern}", e.g "PathInfo =~ \/[0-9]+$"
View Source
public string Matches { get; set; }
Methods
Equals(RouteAttribute)
View Source
protected bool Equals(RouteAttribute other)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.RouteAttribute | other |
Equals(Object)
View Source
public override bool Equals(object obj)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | obj |
GetHashCode()
View Source
public override int GetHashCode()
Returns
System.Int32
ToReflectAttribute()
View Source
public ReflectAttribute ToReflectAttribute()
Returns
Implements
System.Runtime.InteropServices._Attribute
- ServiceStack.IReflectAttributeConverter