LEFT | RIGHT |
1 /* | 1 /* |
2 Copyright 2011 Google Inc | 2 Copyright 2011 Google Inc |
3 | 3 |
4 Licensed under the Apache License, Version 2.0 (the "License"); | 4 Licensed under the Apache License, Version 2.0 (the "License"); |
5 you may not use this file except in compliance with the License. | 5 you may not use this file except in compliance with the License. |
6 You may obtain a copy of the License at | 6 You may obtain a copy of the License at |
7 | 7 |
8 http://www.apache.org/licenses/LICENSE-2.0 | 8 http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 |
10 Unless required by applicable law or agreed to in writing, software | 10 Unless required by applicable law or agreed to in writing, software |
(...skipping 21 matching lines...) Expand all Loading... |
32 /// <summary>Gets the name of the parameter.</summary> | 32 /// <summary>Gets the name of the parameter.</summary> |
33 public string Name { get { return name; } } | 33 public string Name { get { return name; } } |
34 | 34 |
35 /// <summary>Gets the type of the parameter, Path or Query.</summary> | 35 /// <summary>Gets the type of the parameter, Path or Query.</summary> |
36 public RequestParameterType Type { get { return type; } } | 36 public RequestParameterType Type { get { return type; } } |
37 | 37 |
38 /// <summary> | 38 /// <summary> |
39 /// Constructs a new property attribute to be a part of a REST URI.· | 39 /// Constructs a new property attribute to be a part of a REST URI.· |
40 /// This constructor uses <seealso cref="RequestParameterType.Query"/> a
s the parameter's type. | 40 /// This constructor uses <seealso cref="RequestParameterType.Query"/> a
s the parameter's type. |
41 /// </summary> | 41 /// </summary> |
| 42 /// <param name="name"> |
| 43 /// The name of the parameter. If the parameter is a path parameter this
name will be used to substitute the· |
| 44 /// string value into the path, replacing {name}. If the parameter is a
query parameter, this parameter will be |
| 45 /// added to the query string, in the format "name=value". |
| 46 /// </param> |
42 public RequestParameterAttribute(string name) | 47 public RequestParameterAttribute(string name) |
43 : this(name, RequestParameterType.Query) | 48 : this(name, RequestParameterType.Query) |
44 { | 49 { |
45 | 50 |
46 } | 51 } |
47 | 52 |
48 /// <summary>Constructs a new property attribute to be a part of a REST
URI.</summary> | 53 /// <summary>Constructs a new property attribute to be a part of a REST
URI.</summary> |
49 /// <param name="name"> | 54 /// <param name="name"> |
50 /// The name of the parameter. If the parameter is a path parameter this
name will be used to substitute the· | 55 /// The name of the parameter. If the parameter is a path parameter this
name will be used to substitute the· |
51 /// string value into the path, replacing {name}. If the parameter is a
query parameter, this parameter will be | 56 /// string value into the path, replacing {name}. If the parameter is a
query parameter, this parameter will be |
52 /// added to the query string, in the format "name=value". | 57 /// added to the query string, in the format "name=value". |
53 /// </param> | 58 /// </param> |
54 /// <param name="type">The type of the parameter, either Path or Query.<
/param> | 59 /// <param name="type">The type of the parameter, either Path or Query.<
/param> |
55 public RequestParameterAttribute(string name, RequestParameterType type) | 60 public RequestParameterAttribute(string name, RequestParameterType type) |
56 { | 61 { |
57 this.name = name; | 62 this.name = name; |
58 this.type = type; | 63 this.type = type; |
59 } | 64 } |
60 } | 65 } |
61 | 66 |
62 /// <summary>Describe the type of this parameter (Path or Query).</summary> | 67 /// <summary>Describe the type of this parameter (Path or Query).</summary> |
63 public enum RequestParameterType | 68 public enum RequestParameterType |
64 { | 69 { |
65 /// <summary> | 70 /// <summary>A path parameter which is inserted into the path portion of
the request URI.</summary> |
66 /// The parameter is a path parameter and will be inserted into the path
portion of the request URI. | |
67 /// </summary> | |
68 Path, | 71 Path, |
69 | 72 |
70 /// <summary> | 73 /// <summary>A query parameter which is inserted into the query portion
of the request URI.</summary> |
71 /// The parameter is a query parameter and will be inserted into the que
ry portion of the request URI. | |
72 /// </summary> | |
73 Query | 74 Query |
74 } | 75 } |
75 } | 76 } |
LEFT | RIGHT |