UnmodifiableSet.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 abstract class UnmodifiableSet
  8. : ISet
  9. {
  10. protected UnmodifiableSet()
  11. {
  12. }
  13. public virtual void Add(object o)
  14. {
  15. throw new NotSupportedException();
  16. }
  17. public virtual void AddAll(IEnumerable e)
  18. {
  19. throw new NotSupportedException();
  20. }
  21. public virtual void Clear()
  22. {
  23. throw new NotSupportedException();
  24. }
  25. public abstract bool Contains(object o);
  26. public abstract void CopyTo(Array array, int index);
  27. public abstract int Count { get; }
  28. public abstract IEnumerator GetEnumerator();
  29. public abstract bool IsEmpty { get; }
  30. public abstract bool IsFixedSize { get; }
  31. public virtual bool IsReadOnly
  32. {
  33. get { return true; }
  34. }
  35. public abstract bool IsSynchronized { get; }
  36. public abstract object SyncRoot { get; }
  37. public virtual void Remove(object o)
  38. {
  39. throw new NotSupportedException();
  40. }
  41. public virtual void RemoveAll(IEnumerable e)
  42. {
  43. throw new NotSupportedException();
  44. }
  45. }
  46. }
  47. #pragma warning restore
  48. #endif