Binding.cs 1.7 KB

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