DiscoveryClientReferenceCollection.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // System.Web.Services.Protocols.DiscoveryClientReferenceCollection.cs
  3. //
  4. // Author:
  5. // Dave Bettin ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // Copyright (C) Dave Bettin, 2002
  9. // Copyright (C) Tim Coleman, 2002
  10. //
  11. using System.Collections;
  12. namespace System.Web.Services.Discovery {
  13. public sealed class DiscoveryClientReferenceCollection : DictionaryBase {
  14. #region Constructors
  15. public DiscoveryClientReferenceCollection ()
  16. : base ()
  17. {
  18. }
  19. #endregion // Constructors
  20. #region Properties
  21. public DiscoveryReference this [string url] {
  22. get { return (DiscoveryReference) InnerHashtable [url]; }
  23. set { InnerHashtable [url] = value; }
  24. }
  25. public ICollection Keys {
  26. get { return InnerHashtable.Keys; }
  27. }
  28. public ICollection Values {
  29. get { return InnerHashtable.Values; }
  30. }
  31. #endregion // Properties
  32. #region Methods
  33. public void Add (DiscoveryReference value)
  34. {
  35. Add (value.Url, value);
  36. }
  37. public void Add (string url, DiscoveryReference value)
  38. {
  39. InnerHashtable [url] = value;
  40. }
  41. public bool Contains (string url)
  42. {
  43. return InnerHashtable.Contains (url);
  44. }
  45. public void Remove (string url)
  46. {
  47. InnerHashtable.Remove (url);
  48. }
  49. #endregion // Methods
  50. }
  51. }