Best regards mono:: team. 

cesar 
Index: NameObjectCollectionBase.cs
===================================================================
RCS file: 
/mono/mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs,v
retrieving revision 1.7
diff -u -r1.7 NameObjectCollectionBase.cs
--- NameObjectCollectionBase.cs 23 Jul 2002 03:47:46 -0000      1.7
+++ NameObjectCollectionBase.cs 15 Aug 2002 19:52:54 -0000
@@ -1,5 +1,5 @@
 /**
- * System.Collections.Specialized.NamaValueCollection class implementation
+ * System.Collections.Specialized.NameValueCollection class implementation
  * 
  * Author: Gleb Novodran
  */
@@ -202,8 +202,19 @@
                }
                protected NameObjectCollectionBase( SerializationInfo info, 
StreamingContext context )
                {
-                       throw new Exception("Not implemented yet");
+                       int i, tmpCount;
+
+                       this.IsReadOnly = (bool) info.GetValue ("ReadOnly", typeof 
+(bool));
+                       this.m_hashprovider = (IHashCodeProvider) info.GetValue 
+("HashProvider", typeof (IHashCodeProvider));
+                       this.m_comparer = (IComparer) info.GetValue ("Comparer", 
+typeof (IComparer));
+                       tmpCount = (int) info.GetValue ("Count", typeof (int));        
+ 
+                       string [] tmpKeys = (string []) info.GetValue ("Keys", typeof 
+(string []));
+                       object [] tmpObjs = (object []) info.GetValue ("Values", 
+typeof (object []));
+               
+                       for (i = 0; i < tmpCount; i++)
+                               BaseAdd (tmpKeys [i], tmpObjs [i]);
                }
+
                protected NameObjectCollectionBase( int capacity, IHashCodeProvider 
hashProvider, IComparer comparer )
                {
                        m_readonly = false;
@@ -249,9 +260,14 @@
                // GetHashCode
                
                // ISerializable
-               public virtual void /*ISerializable*/ GetObjectData( SerializationInfo 
info, StreamingContext context )
+               public virtual void GetObjectData( SerializationInfo info, 
+StreamingContext context )
                {
-                       throw new Exception("Not implemented yet");
+                       info.AddValue ("ReadOnly", this.IsReadOnly, typeof (bool));
+                       info.AddValue ("HashProvider", this.HashCodeProvider, typeof 
+(IHashCodeProvider));
+                       info.AddValue ("Comparer", this.Comparer , typeof (IComparer));
+                       info.AddValue ("Count", this.Count, typeof (int));
+                       info.AddValue ("Keys", this.BaseGetAllKeys (), typeof (string 
+[]));
+                       info.AddValue ("Values", this.BaseGetAllValues () , typeof 
+(object [])); 
                }
 
                // ICollection
Index: ChangeLog
===================================================================
RCS file: /mono/mcs/class/System/System.Collections.Specialized/ChangeLog,v
retrieving revision 1.13
diff -u -r1.13 ChangeLog
--- ChangeLog   23 Jul 2002 03:47:46 -0000      1.13
+++ ChangeLog   15 Aug 2002 19:58:07 -0000
@@ -1,3 +1,7 @@
+2002-08-15  Cesar Octavio Lopez Nataren <[EMAIL PROTECTED]>
+       * NameObjectCollectionBase.cs: implemented the ctr and GetObjectData method 
+       needed for ISerializable implementation.
+
 2002-07-22  Tim Coleman <[EMAIL PROTECTED]>
        * NameObjectCollectionBase.cs: added iterator stubb to 
                NameObjectCollectionBase.KeysCollection


Reply via email to