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