DiscoveryExceptionDictionary.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // System.Web.Services.Protocols.DiscoveryExceptionDictionary.cs
  3. //
  4. // Author:
  5. // Dave Bettin ([email protected])
  6. // Lluis Sanchez Gual ([email protected])
  7. //
  8. // Copyright (C) Dave Bettin, 2002
  9. //
  10. using System.Collections;
  11. namespace System.Web.Services.Discovery
  12. {
  13. public sealed class DiscoveryExceptionDictionary : DictionaryBase
  14. {
  15. #region Constructors
  16. public DiscoveryExceptionDictionary ()
  17. {
  18. }
  19. #endregion // Constructors
  20. #region Properties
  21. public Exception this[string url] {
  22. get { return (Exception) InnerHashtable [url]; }
  23. set {
  24. if (url == null)
  25. throw new ArgumentNullException ();
  26. InnerHashtable [url] = value;
  27. }
  28. }
  29. public ICollection Keys {
  30. get { return InnerHashtable.Keys; }
  31. }
  32. public ICollection Values {
  33. get { return InnerHashtable.Values; }
  34. }
  35. #endregion // Properties
  36. #region Methods
  37. public void Add (string url, Exception value)
  38. {
  39. InnerHashtable.Add (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. }