OperationBindingCollection.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // System.Web.Services.Description.OperationBindingCollection.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. namespace System.Web.Services.Description {
  10. public sealed class OperationBindingCollection : ServiceDescriptionBaseCollection {
  11. #region Constructors
  12. internal OperationBindingCollection (Binding binding)
  13. : base (binding)
  14. {
  15. }
  16. #endregion // Constructors
  17. #region Properties
  18. public OperationBinding this [int index] {
  19. get {
  20. if (index < 0 || index > Count)
  21. throw new ArgumentOutOfRangeException ();
  22. return (OperationBinding) List[index];
  23. }
  24. set { List[index] = value; }
  25. }
  26. #endregion // Properties
  27. #region Methods
  28. public int Add (OperationBinding bindingOperation)
  29. {
  30. Insert (Count, bindingOperation);
  31. return (Count - 1);
  32. }
  33. public bool Contains (OperationBinding bindingOperation)
  34. {
  35. return List.Contains (bindingOperation);
  36. }
  37. public void CopyTo (OperationBinding[] array, int index)
  38. {
  39. List.CopyTo (array, index);
  40. }
  41. public int IndexOf (OperationBinding bindingOperation)
  42. {
  43. return List.IndexOf (bindingOperation);
  44. }
  45. public void Insert (int index, OperationBinding bindingOperation)
  46. {
  47. List.Insert (index, bindingOperation);
  48. }
  49. public void Remove (OperationBinding bindingOperation)
  50. {
  51. List.Remove (bindingOperation);
  52. }
  53. protected override void SetParent (object value, object parent)
  54. {
  55. ((OperationBinding) value).SetParent ((Binding) parent);
  56. }
  57. #endregion // Methods
  58. }
  59. }