X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web.Services%2FSystem.Web.Services.Description%2FMessage.cs;h=0e1e37e7980f5fb04f30aaff41ebb6fe9e9c52c1;hb=2670761ee7f20ecfb4b49610394aca0f44aa0738;hp=376dc9f350288bc25aab0bf7c2e0914d283e3009;hpb=9d61782c6e2392d7ceec2006b35be582598a70ae;p=mono.git diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/Message.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/Message.cs index 376dc9f3502..0e1e37e7980 100644 --- a/mcs/class/System.Web.Services/System.Web.Services.Description/Message.cs +++ b/mcs/class/System.Web.Services/System.Web.Services.Description/Message.cs @@ -1,11 +1,11 @@ -// -// System.Web.Services.Description.Message.cs -// -// Author: -// Tim Coleman (tim@timcoleman.com) -// -// Copyright (C) Tim Coleman, 2002 -// +// +// System.Web.Services.Description.Message.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// // // Permission is hereby granted, free of charge, to any person obtaining @@ -27,111 +27,111 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // - -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; + +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 - ServiceDescriptionFormatExtensionCollection extensions; + [XmlFormatExtensionPoint ("Extensions")] #endif - - #endregion // Fields - - #region Constructors - - public Message () - { -#if !NET_2_0 - name = String.Empty; -#endif + public sealed class Message : #if NET_2_0 - extensions = new ServiceDescriptionFormatExtensionCollection (this); + NamedItem +#else + DocumentableItem #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; } - } + { + #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; } - } + 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 - } -} + #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 + } +}