-\r
-using System.Collections;\r
-using System.Web.Services;\r
-using System.Xml.Serialization;\r
-\r
-namespace System.Web.Services.Description \r
-{\r
- public sealed class Message :\r
-#if NET_2_0\r
- NamedItem\r
-#else\r
- DocumentableItem \r
-#endif\r
- {\r
- #region Fields\r
-\r
-#if !NET_2_0\r
- string name;\r
-#endif\r
- MessagePartCollection parts;\r
- ServiceDescription serviceDescription;\r
-\r
- #endregion // Fields\r
-\r
- #region Constructors\r
- \r
- public Message ()\r
- {\r
-#if !NET_2_0\r
- name = String.Empty;\r
-#endif\r
- parts = new MessagePartCollection (this);\r
- serviceDescription = null;\r
- }\r
- \r
- #endregion // Constructors\r
-\r
- #region Properties\r
-\r
-#if !NET_2_0\r
- [XmlAttribute ("name", DataType = "NCName")]\r
- public string Name {\r
- get { return name; }\r
- set { name = value; }\r
- }\r
-#endif\r
-\r
- [XmlElement ("part")]\r
- public MessagePartCollection Parts {\r
- get { return parts; }\r
- }\r
-\r
-// [XmlIgnore]\r
- public ServiceDescription ServiceDescription {\r
- get { return serviceDescription; }\r
- }\r
-\r
- #endregion // Properties\r
-\r
- #region Methods\r
-\r
- public MessagePart FindPartByName (string partName)\r
- {\r
- return parts [partName];\r
- }\r
-\r
- public MessagePart[] FindPartsByName (string[] partNames) \r
- {\r
- ArrayList searchResults = new ArrayList ();\r
-\r
- foreach (string partName in partNames)\r
- searchResults.Add (FindPartByName (partName));\r
-\r
- int count = searchResults.Count;\r
-\r
- if (count == 0)\r
- throw new ArgumentException ();\r
-\r
- MessagePart[] returnValue = new MessagePart[count];\r
- searchResults.CopyTo (returnValue);\r
- return returnValue;\r
- }\r
-\r
- internal void SetParent (ServiceDescription serviceDescription)\r
- {\r
- this.serviceDescription = serviceDescription;\r
- }\r
-\r
- #endregion\r
- }\r
-}\r
+
+using System.Collections;
+using System.Web.Services;
+using System.Web.Services.Configuration;
+using System.Xml.Serialization;
+
+namespace System.Web.Services.Description
+{
+#if NET_2_0
+ [XmlFormatExtensionPoint ("Extensions")]
+#endif
+ public sealed class Message :
+#if NET_2_0
+ NamedItem
+#else
+ DocumentableItem
+#endif
+ {
+ #region Fields
+
+#if !NET_2_0
+ string name;
+#endif
+ MessagePartCollection parts;
+ ServiceDescription serviceDescription;
+#if NET_2_0
+ ServiceDescriptionFormatExtensionCollection extensions;
+#endif
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public Message ()
+ {
+#if !NET_2_0
+ name = String.Empty;
+#endif
+#if NET_2_0
+ extensions = new ServiceDescriptionFormatExtensionCollection (this);
+#endif
+ parts = new MessagePartCollection (this);
+ serviceDescription = null;
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+#if !NET_2_0
+ [XmlAttribute ("name", DataType = "NCName")]
+ public string Name {
+ get { return name; }
+ set { name = value; }
+ }
+#endif
+
+ [XmlElement ("part")]
+ public MessagePartCollection Parts {
+ get { return parts; }
+ }
+
+// [XmlIgnore]
+ public ServiceDescription ServiceDescription {
+ get { return serviceDescription; }
+ }
+
+#if NET_2_0
+ [XmlIgnore]
+ public override ServiceDescriptionFormatExtensionCollection Extensions {
+ get { return extensions; }
+ }
+#endif
+
+ #endregion // Properties
+
+ #region Methods
+
+ public MessagePart FindPartByName (string partName)
+ {
+ return parts [partName];
+ }
+
+ public MessagePart[] FindPartsByName (string[] partNames)
+ {
+ ArrayList searchResults = new ArrayList ();
+
+ foreach (string partName in partNames)
+ searchResults.Add (FindPartByName (partName));
+
+ int count = searchResults.Count;
+
+ if (count == 0)
+ throw new ArgumentException ();
+
+ MessagePart[] returnValue = new MessagePart[count];
+ searchResults.CopyTo (returnValue);
+ return returnValue;
+ }
+
+ internal void SetParent (ServiceDescription serviceDescription)
+ {
+ this.serviceDescription = serviceDescription;
+ }
+
+ #endregion
+ }
+}