UnmodifiableSetProxy.cs 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.Collections;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections
  6. {
  7. public class UnmodifiableSetProxy
  8. : UnmodifiableSet
  9. {
  10. private readonly ISet s;
  11. public UnmodifiableSetProxy (ISet s)
  12. {
  13. this.s = s;
  14. }
  15. public override bool Contains(object o)
  16. {
  17. return s.Contains(o);
  18. }
  19. public override void CopyTo(Array array, int index)
  20. {
  21. s.CopyTo(array, index);
  22. }
  23. public override int Count
  24. {
  25. get { return s.Count; }
  26. }
  27. public override IEnumerator GetEnumerator()
  28. {
  29. return s.GetEnumerator();
  30. }
  31. public override bool IsEmpty
  32. {
  33. get { return s.IsEmpty; }
  34. }
  35. public override bool IsFixedSize
  36. {
  37. get { return s.IsFixedSize; }
  38. }
  39. public override bool IsSynchronized
  40. {
  41. get { return s.IsSynchronized; }
  42. }
  43. public override object SyncRoot
  44. {
  45. get { return s.SyncRoot; }
  46. }
  47. }
  48. }
  49. #pragma warning restore
  50. #endif