Binding.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. public ServiceDescription ServiceDescription {
  47. get { return serviceDescription; }
  48. }
  49. [XmlAttribute ("type")]
  50. public XmlQualifiedName Type {
  51. get { return type; }
  52. set { type = value; }
  53. }
  54. #endregion // Properties
  55. #region Methods
  56. internal void SetParent (ServiceDescription serviceDescription)
  57. {
  58. this.serviceDescription = serviceDescription;
  59. }
  60. #endregion // Methods
  61. }
  62. }