(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Web.Services / System.Web.Services.Description / Operation.cs
blob5c1156f14b0f328870a3e41678b7583da5fd8b46
1 //
2 // System.Web.Services.Description.Operation.cs
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
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.
31 using System.ComponentModel;
32 using System.Xml;
33 using System.Xml.Serialization;
35 namespace System.Web.Services.Description
37 public sealed class Operation :
38 #if NET_2_0
39 NamedItem
40 #else
41 DocumentableItem
42 #endif
44 #region Fields
46 OperationFaultCollection faults;
47 OperationMessageCollection messages;
48 #if !NET_2_0
49 string name;
50 #endif
51 string[] parameterOrder;
52 PortType portType;
54 #endregion // Fields
56 #region Constructors
58 public Operation ()
60 faults = new OperationFaultCollection (this);
61 messages = new OperationMessageCollection (this);
62 #if !NET_2_0
63 name = String.Empty;
64 #endif
65 parameterOrder = null;
66 portType = null;
69 #endregion // Constructors
71 #region Properties
73 [XmlElement ("fault")]
74 public OperationFaultCollection Faults {
75 get { return faults; }
78 [XmlElement ("output", typeof (OperationOutput))]
79 [XmlElement ("input", typeof (OperationInput))]
80 public OperationMessageCollection Messages {
81 get { return messages; }
84 #if !NET_2_0
85 [XmlAttribute ("name", DataType = "NCName")]
86 public string Name {
87 get { return name; }
88 set { name = value; }
90 #endif
92 [XmlIgnore]
93 public string[] ParameterOrder {
94 get { return parameterOrder; }
95 set { parameterOrder = value; }
98 [DefaultValue ("")]
99 [XmlAttribute ("parameterOrder")]
100 public string ParameterOrderString {
101 get {
102 if (parameterOrder == null)
103 return String.Empty;
104 return String.Join (" ", parameterOrder);
106 set { ParameterOrder = value.Split (' '); }
109 // [XmlIgnore]
110 public PortType PortType {
111 get { return portType; }
114 #endregion // Properties
116 #region Methods
118 public bool IsBoundBy (OperationBinding operationBinding)
120 return (operationBinding.Name == Name);
123 internal void SetParent (PortType portType)
125 this.portType = portType;
128 #endregion