Service.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. [XmlIgnore]
  42. public ServiceDescription ServiceDescription {
  43. get { return serviceDescription; }
  44. }
  45. #endregion // Properties
  46. #region Methods
  47. internal void SetParent (ServiceDescription serviceDescription)
  48. {
  49. this.serviceDescription = serviceDescription;
  50. }
  51. #endregion // Methods
  52. }
  53. }