Repository navigation
Expand file tree
/
Copy pathIServiceRoutes.cs
More file actions
93 lines (89 loc) · 4.38 KB
/
Copy pathIServiceRoutes.cs
File metadata and controls
93 lines (89 loc) · 4.38 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
namespace ServiceStack.Web
{
/// <summary>
/// Allow the registration of user-defined routes for services
/// </summary>
public interface IServiceRoutes
{
/// <summary>
/// Maps the specified REST path to the specified request DTO.
/// </summary>
/// <typeparam name="TRequest">The type of request DTO to map
/// the path to.</typeparam>
/// <param name="restPath">The path to map the request DTO to.
/// See <see cref="RouteAttribute.Path">RouteAttribute.Path</see>
/// for details on the correct format.</param>
/// <returns>The same <see cref="IServiceRoutes"/> instance;
/// never <see langword="null"/>.</returns>
IServiceRoutes Add<TRequest>(string restPath);
/// <summary>
/// Maps the specified REST path to the specified request DTO, and
/// specifies the HTTP verbs supported by the path.
/// </summary>
/// <typeparam name="TRequest">The type of request DTO to map
/// the path to.</typeparam>
/// <param name="restPath">The path to map the request DTO to.
/// See <see cref="RouteAttribute.Path">RouteAttribute.Path</see>
/// for details on the correct format.</param>
/// <param name="verbs">
/// The comma-delimited list of HTTP verbs supported by the path,
/// such as "GET,PUT,DELETE". Specify empty or <see langword="null"/>
/// to indicate that all verbs are supported.
/// </param>
/// <returns>The same <see cref="IServiceRoutes"/> instance;
/// never <see langword="null"/>.</returns>
IServiceRoutes Add<TRequest>(string restPath, string verbs);
/// <summary>
/// Maps the specified REST path to the specified request DTO,
/// specifies the HTTP verbs supported by the path, and indicates
/// the default MIME type of the returned response.
/// </summary>
/// <param name="requestType">
/// The type of request DTO to map the path to.
/// </param>
/// <param name="restPath">The path to map the request DTO to.
/// See <see cref="RouteAttribute.Path">RouteAttribute.Path</see>
/// for details on the correct format.</param>
/// <param name="verbs">
/// The comma-delimited list of HTTP verbs supported by the path,
/// such as "GET,PUT,DELETE".
/// </param>
/// <returns>The same <see cref="IServiceRoutes"/> instance;
/// never <see langword="null"/>.</returns>
IServiceRoutes Add(System.Type requestType, string restPath, string verbs);
/// <summary>
/// Maps the specified REST path to the specified request DTO,
/// specifies the HTTP verbs supported by the path, and indicates
/// the default MIME type of the returned response.
/// </summary>
/// <param name="priority">
/// Used to rank the precedences of route definitions in reverse routing.
/// i.e. Priorities below 0 are auto-generated have less precedence.
/// </param>
IServiceRoutes Add(System.Type requestType, string restPath, string verbs, int priority);
/// <summary>
/// Maps the specified REST path to the specified request DTO,
/// specifies the HTTP verbs supported by the path, and indicates
/// the default MIME type of the returned response.
/// </summary>
/// <param name="requestType">
/// The type of request DTO to map the path to.
/// </param>
/// <param name="restPath">The path to map the request DTO to.
/// See <see cref="RouteAttribute.Path">RouteAttribute.Path</see>
/// for details on the correct format.</param>
/// <param name="verbs">
/// The comma-delimited list of HTTP verbs supported by the path,
/// such as "GET,PUT,DELETE".
/// </param>
/// <param name="summary">
/// The short summary of what the REST does.
/// </param>
/// <param name="notes">
/// The longer text to explain the behaviour of the REST.
/// </param>
/// <returns>The same <see cref="IServiceRoutes"/> instance;
/// never <see langword="null"/>.</returns>
IServiceRoutes Add(System.Type requestType, string restPath, string verbs, string summary, string notes);
}
}