b70fb603467c9fde6c6427611414bf4ba87c83a8
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Protocols / SoapDocumentMethodAttribute.cs
1 // \r
2 // System.Web.Services.Protocols.SoapDocumentMethodAttribute.cs\r
3 //\r
4 // Author:\r
5 //   Tim Coleman (tim@timcoleman.com)\r
6 //\r
7 // Copyright (C) Tim Coleman, 2002\r
8 //\r
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 \r
31 using System.Web.Services.Description;\r
32 \r
33 namespace System.Web.Services.Protocols {\r
34         [AttributeUsage (AttributeTargets.Method, Inherited = true)]\r
35         public sealed class SoapDocumentMethodAttribute : Attribute {\r
36 \r
37                 #region Fields\r
38 \r
39                 string action;\r
40                 string binding;\r
41                 bool oneWay;\r
42                 SoapParameterStyle parameterStyle;\r
43                 string requestElementName;\r
44                 string requestNamespace;\r
45                 string responseElementName;\r
46                 string responseNamespace;\r
47                 SoapBindingUse use;\r
48 \r
49                 #endregion\r
50 \r
51                 #region Constructors\r
52 \r
53                 public SoapDocumentMethodAttribute () \r
54                 {\r
55                 }\r
56 \r
57                 public SoapDocumentMethodAttribute (string action)\r
58                         : this ()\r
59                 {\r
60                         this.action = action;\r
61                 }\r
62                 \r
63                 #endregion // Constructors\r
64 \r
65                 #region Properties\r
66 \r
67                 public string Action {\r
68                         get { return action; }\r
69                         set { action = value; }\r
70                 }\r
71 \r
72                 public string Binding {\r
73                         get {\r
74                                 if (binding != null)\r
75                                         return binding;\r
76                                 return "";\r
77                         }\r
78                         set { binding = value; }\r
79                 }\r
80 \r
81                 public bool OneWay {\r
82                         get { return oneWay; }\r
83                         set { oneWay = value; }\r
84                 }\r
85 \r
86                 public SoapParameterStyle ParameterStyle {\r
87                         get { return parameterStyle; }\r
88                         set { parameterStyle = value; }\r
89                 }\r
90 \r
91                 public string RequestElementName {\r
92                         get {\r
93                                 if (requestElementName == null)\r
94                                         return "";\r
95                                 return requestElementName;\r
96                         }\r
97                         set { requestElementName = value; }\r
98                 }\r
99 \r
100                 public string RequestNamespace {\r
101                         get {\r
102                                 if (requestNamespace == null)\r
103                                         return "";\r
104                                 \r
105                                 return requestNamespace;\r
106                         }\r
107                         set { requestNamespace = value; }\r
108                 }\r
109 \r
110                 public string ResponseElementName {\r
111                         get {\r
112                                 if (responseElementName == null)\r
113                                         return "";\r
114                                 return responseElementName;\r
115                         }\r
116                         set { responseElementName = value; }\r
117                 }\r
118 \r
119                 public string ResponseNamespace {\r
120                         get {\r
121                                 if (responseNamespace == null)\r
122                                         return "";\r
123                                 return responseNamespace;\r
124                         }\r
125                         set { responseNamespace = value; }\r
126                 }\r
127 \r
128                 public SoapBindingUse Use {\r
129                         get { return use; }\r
130                         set { use = value; }\r
131                 }\r
132 \r
133                 #endregion // Properties\r
134         }\r
135 }\r