WebHashCodeProvider.cs 854 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * Namespace: System.Web.Utils
  3. * Class: WebHashCodeProvider
  4. *
  5. * Author: Gaurav Vaish
  6. * Maintainer: [email protected]
  7. * Contact: <[email protected]>, <[email protected]>
  8. * Implementation: yes
  9. * Status: ??%
  10. *
  11. * (C) Gaurav Vaish (2001)
  12. */
  13. using System.Collections;
  14. using System.Globalization;
  15. namespace System.Web.Utils
  16. {
  17. public class WebHashCodeProvider : IHashCodeProvider
  18. {
  19. private static IHashCodeProvider defHcp;
  20. public WebHashCodeProvider()
  21. {
  22. }
  23. int IHashCodeProvider.GetHashCode(object key)
  24. {
  25. return Default.GetHashCode(key);
  26. }
  27. public static IHashCodeProvider Default
  28. {
  29. get
  30. {
  31. if(defHcp==null)
  32. {
  33. defHcp = new CaseInsensitiveHashCodeProvider(CultureInfo.InvariantCulture);
  34. }
  35. return defHcp;
  36. }
  37. }
  38. }
  39. }