Service.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // System.Web.Services.Description.Service.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System.Xml.Serialization;
  10. namespace System.Web.Services.Description {
  11. public sealed class Service : DocumentableItem {
  12. #region Fields
  13. ServiceDescriptionFormatExtensionCollection extensions;
  14. string name;
  15. PortCollection ports;
  16. ServiceDescription serviceDescription;
  17. #endregion // Fields
  18. #region Constructors
  19. public Service ()
  20. {
  21. extensions = new ServiceDescriptionFormatExtensionCollection (this);
  22. name = String.Empty;
  23. ports = new PortCollection (this);
  24. serviceDescription = null;
  25. }
  26. #endregion // Constructors
  27. #region Properties
  28. [XmlIgnore]
  29. public ServiceDescriptionFormatExtensionCollection Extensions {
  30. get { return extensions; }
  31. }
  32. [XmlAttribute ("name", DataType = "NCName")]
  33. public string Name {
  34. get { return name; }
  35. set { name = value; }
  36. }
  37. [XmlElement ("port")]
  38. public PortCollection Ports {
  39. get { return ports; }
  40. }
  41. public ServiceDescription ServiceDescription {
  42. get { return serviceDescription; }
  43. }
  44. #endregion // Properties
  45. #region Methods
  46. internal void SetParent (ServiceDescription serviceDescription)
  47. {
  48. this.serviceDescription = serviceDescription;
  49. }
  50. #endregion // Methods
  51. }
  52. }