2003-03-01 Sebastien Pouliot <spouliot@videotron.ca>
authorSebastien Pouliot <sebastien@ximian.com>
Sat, 1 Mar 2003 21:16:05 +0000 (21:16 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sat, 1 Mar 2003 21:16:05 +0000 (21:16 -0000)
* X509CertificateCollection.cs: Fixed bugs in AddRange
(added the collection not the certificates in the collection).

svn path=/trunk/mcs/; revision=12091

mcs/class/System/System.Security.Cryptography.X509Certificates/ChangeLog
mcs/class/System/System.Security.Cryptography.X509Certificates/X509CertificateCollection.cs

index fced32483a9738a0c8a528ac1cd53846952f4a1a..da3b0415be3e248b662d15f43fee27df45ec76e3 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-01  Sebastien Pouliot  <spouliot@videotron.ca>
+
+       * X509CertificateCollection.cs: Fixed bugs in AddRange
+       (added the collection not the certificates in the collection).
+
 2003-01-30  Sebastien Pouliot  <spouliot@videotron.ca>
 
        * X509CertificateCollection.cs: Replaced the use of the private 
index 6591b4919bdce54ae9f5398b26a819154e0efd79..3b5abccecd05a035e83b5abcb8bc9dd060a90a15 100644 (file)
@@ -1,8 +1,9 @@
 //
 // System.Security.Cryptography.X509Certificates.X509CertificateCollection
 //
-// Author:
+// Authors:
 //     Lawrence Pit (loz@cable.a2000.nl)
+//     Sebastien Pouliot (spouliot@motus.com)
 //
 
 using System;
@@ -47,17 +48,18 @@ public class X509CertificateCollection : CollectionBase, IEnumerable {
        {
                if (value == null)
                        throw new ArgumentNullException ("value");
+
                for (int i = 0; i < value.Length; i++) 
-                       InnerList.Add (value);
+                       InnerList.Add (value [i]);
        }
        
        public void AddRange (X509CertificateCollection value)
        {
                if (value == null)
                        throw new ArgumentNullException ("value");
-               int len = value.InnerList.Count;
-               for (int i = 0; i < len; i++) 
-                       InnerList.Add (value);
+
+               for (int i = 0; i < value.InnerList.Count; i++) 
+                       InnerList.Add (value [i]);
        }
        
        public bool Contains (X509Certificate value) 
@@ -121,7 +123,7 @@ public class X509CertificateCollection : CollectionBase, IEnumerable {
                }
                
                object IEnumerator.Current {
-                       get { return (X509Certificate) enumerator.Current; }
+                       get { return enumerator.Current; }
                }
 
                // Methods