forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestServiceAttribute.cs
More file actions
44 lines (42 loc) · 1.63 KB
/
RestServiceAttribute.cs
File metadata and controls
44 lines (42 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.IO;
namespace ServiceStack.Server
{
/// <summary>
/// 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.
/// </summary>
[Obsolete("Use [Route] instead of [RestService].")]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public class RestServiceAttribute
: RouteAttribute
{
/// <summary>
/// <para>Initializes an instance of the <see cref="RestServiceAttribute"/> class.</para>
/// </summary>
/// <param name="path">
/// <para>The path template to map to the request. See
/// <see cref="Path">RestServiceAttribute.Path</see>
/// for details on the correct format.</para>
/// </param>
public RestServiceAttribute(string path)
: base(path, null)
{
}
/// <summary>
/// <para>Initializes an instance of the <see cref="RestServiceAttribute"/> class.</para>
/// </summary>
/// <param name="path">
/// <para>The path template to map to the request. See
/// <see cref="Path">RestServiceAttribute.Path</see>
/// for details on the correct format.</para>
/// </param>
/// <param name="verbs">A comma-delimited list of HTTP verbs supported by the
/// service. If unspecified, all verbs are assumed to be supported.</param>
public RestServiceAttribute(string path, string verbs)
: base(path, verbs)
{
}
}
}