2 // System.Web.Services.Description.Operation.cs
\r
5 // Tim Coleman (tim@timcoleman.com)
\r
7 // Copyright (C) Tim Coleman, 2002
\r
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:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
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;
\r
33 using System.Xml.Serialization;
\r
34 using System.Web.Services.Configuration;
36 namespace System.Web.Services.Description
\r
39 [XmlFormatExtensionPoint ("Extensions")]
\r
41 public sealed class Operation :
\r
50 OperationFaultCollection faults;
\r
51 OperationMessageCollection messages;
\r
55 string[] parameterOrder;
\r
58 ServiceDescriptionFormatExtensionCollection extensions;
\r
61 #endregion // Fields
\r
63 #region Constructors
\r
67 faults = new OperationFaultCollection (this);
\r
68 messages = new OperationMessageCollection (this);
\r
70 name = String.Empty;
\r
72 parameterOrder = null;
\r
75 extensions = new ServiceDescriptionFormatExtensionCollection (this);
\r
79 #endregion // Constructors
\r
83 [XmlElement ("fault")]
\r
84 public OperationFaultCollection Faults {
\r
85 get { return faults; }
\r
88 [XmlElement ("output", typeof (OperationOutput))]
\r
89 [XmlElement ("input", typeof (OperationInput))]
\r
90 public OperationMessageCollection Messages {
\r
91 get { return messages; }
\r
95 [XmlAttribute ("name", DataType = "NCName")]
\r
96 public string Name {
\r
97 get { return name; }
\r
98 set { name = value; }
\r
103 public string[] ParameterOrder {
\r
104 get { return parameterOrder; }
\r
105 set { parameterOrder = value; }
\r
108 [DefaultValue ("")]
\r
109 [XmlAttribute ("parameterOrder")]
\r
110 public string ParameterOrderString {
\r
112 if (parameterOrder == null)
\r
113 return String.Empty;
\r
114 return String.Join (" ", parameterOrder);
\r
116 set { ParameterOrder = value.Split (' '); }
\r
120 public PortType PortType {
\r
121 get { return portType; }
\r
126 public override ServiceDescriptionFormatExtensionCollection Extensions {
127 get { return extensions; }
\r
131 #endregion // Properties
\r
135 public bool IsBoundBy (OperationBinding operationBinding)
\r
137 return (operationBinding.Name == Name);
\r
140 internal void SetParent (PortType portType)
\r
142 this.portType = portType;
\r