1aa7ece200955a2ebf8b8149fc472a612efd539d
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / SoapFaultBinding.cs
1 // \r
2 // System.Web.Services.Description.SoapFaultBinding.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.ComponentModel;\r
32 using System.Web.Services.Configuration;\r
33 using System.Xml.Serialization;\r
34 \r
35 namespace System.Web.Services.Description {\r
36         [XmlFormatExtension ("fault", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (FaultBinding))]\r
37         public class SoapFaultBinding : ServiceDescriptionFormatExtension {\r
38 \r
39                 #region Fields\r
40 \r
41                 string encoding;\r
42                 string ns;\r
43                 SoapBindingUse use;\r
44                 string name;\r
45 \r
46                 #endregion // Fields\r
47 \r
48                 #region Constructors\r
49                 \r
50                 public SoapFaultBinding ()\r
51                 {\r
52                         encoding = String.Empty;\r
53                         ns = String.Empty;\r
54                         use = SoapBindingUse.Default;\r
55                 }\r
56                 \r
57                 #endregion // Constructors\r
58 \r
59                 #region Properties\r
60 \r
61 #if NET_2_0\r
62                 [DefaultValue ("")]\r
63 #endif\r
64                 [XmlAttribute ("encodingStyle")]\r
65                 public string Encoding {\r
66                         get { return encoding; }\r
67                         set { encoding = value; }\r
68                 }\r
69         \r
70                 [XmlAttribute ("namespace")]    \r
71                 public string Namespace {\r
72                         get { return ns; }\r
73                         set { ns = value; }\r
74                 }\r
75 \r
76                 [DefaultValue (SoapBindingUse.Default)]\r
77                 [XmlAttribute ("use")]\r
78                 public SoapBindingUse Use {\r
79                         get { return use; }\r
80                         set { use = value; }\r
81                 }\r
82 \r
83 #if NET_2_0\r
84                 [XmlAttribute ("name")]\r
85                 public string Name {\r
86                         get { return name; }\r
87                         set { name = value; }\r
88                 }\r
89 #endif\r
90                 #endregion // Properties\r
91         }\r
92 }\r