SignerInfoCollection.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // SignerInfoCollection.cs - System.Security.Cryptography.Pkcs.SignerInfoCollection
  3. //
  4. // Author:
  5. // Sebastien Pouliot ([email protected])
  6. //
  7. // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Collections;
  12. namespace System.Security.Cryptography.Pkcs {
  13. public class SignerInfoCollection : ICollection {
  14. private ArrayList _list;
  15. // only accessible from SignedPkcs7.SignerInfos or SignerInfo.CounterSignerInfos
  16. internal SignerInfoCollection ()
  17. {
  18. _list = new ArrayList ();
  19. }
  20. // properties
  21. public int Count {
  22. get { return _list.Count; }
  23. }
  24. public bool IsSynchronized {
  25. get { return _list.IsSynchronized; }
  26. }
  27. public SignerInfo this [int index] {
  28. get { return (SignerInfo) _list [index]; }
  29. }
  30. public object SyncRoot {
  31. get { return _list.SyncRoot; }
  32. }
  33. // methods
  34. internal void Add (SignerInfo signer)
  35. {
  36. _list.Add (signer);
  37. }
  38. public void CopyTo (Array array, int index)
  39. {
  40. _list.CopyTo (array, index);
  41. }
  42. public void CopyTo (RecipientInfo[] array, int index) {}
  43. public SignerInfoEnumerator GetEnumerator ()
  44. {
  45. return new SignerInfoEnumerator (_list);
  46. }
  47. IEnumerator IEnumerable.GetEnumerator ()
  48. {
  49. return new SignerInfoEnumerator (_list);
  50. }
  51. }
  52. }
  53. #endif