[corlib] Remove System.Core security types
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / SoapBodyBinding.cs
1 // 
2 // System.Web.Services.Description.SoapBodyBinding.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
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
31 using System.ComponentModel;
32 using System.Web.Services.Configuration;
33 using System.Xml.Serialization;
34
35 namespace System.Web.Services.Description {
36         [XmlFormatExtension ("body", "http://schemas.xmlsoap.org/wsdl/soap/", typeof (InputBinding), typeof (OutputBinding), typeof (MimePart))]
37         public class SoapBodyBinding : ServiceDescriptionFormatExtension {
38
39                 #region Fields
40                 
41                 string encoding;
42                 string ns;
43                 string[] parts;
44                 string partsString;
45                 SoapBindingUse use;
46
47                 #endregion // Fields
48
49                 #region Constructors
50                 
51                 public SoapBodyBinding ()
52                 {
53                         encoding = String.Empty;
54                         ns = String.Empty;
55                         parts = null;
56                         partsString = null;
57                         use = SoapBindingUse.Default;
58                 }
59                 
60                 #endregion // Constructors
61
62                 #region Properties
63
64                 [DefaultValue ("")]
65                 [XmlAttribute ("encodingStyle")]
66                 public string Encoding {
67                         get { return encoding; }
68                         set { encoding = value; }
69                 }
70
71                 [DefaultValue ("")]
72                 [XmlAttribute ("namespace")]
73                 public string Namespace {
74                         get { return ns; }
75                         set { ns = value; }
76                 }
77
78                 [XmlIgnore]
79                 public string[] Parts {
80                         get { return parts; }
81                         set {
82                                 parts = value;
83                                 if (value == null)
84                                         partsString = null;
85                                 else
86                                         partsString = String.Join(" ", value);
87                         }
88                 }
89
90                 [XmlAttribute ("parts")]
91                 public string PartsString {
92                         get { return partsString; }
93                         set {
94                                 partsString = value;
95                                 if (value == null)
96                                         parts = null;
97                                 else
98                                         parts = value.Split(' ');
99                         }
100                 }
101
102                 [DefaultValue (SoapBindingUse.Default)]
103                 [XmlAttribute ("use")]
104                 public SoapBindingUse Use {
105                         get { return use; }
106                         set { use = value; }
107                 }
108
109                 #endregion // Properties
110         }
111 }