* AppDomainSetup.cs: added TODO for serialization
authorGert Driesen <drieseng@users.sourceforge.net>
Tue, 15 Jun 2004 17:47:32 +0000 (17:47 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Tue, 15 Jun 2004 17:47:32 +0000 (17:47 -0000)
* ExecutionEngineException.cs: added missing serialization ctor
* InvalidProgramException.cs: added missing serialization ctor
* MulticastNotSupportedException.cs: added missing serialization ctor
* ObsoleteAttribute.cs: fixed serialization compatibility with MS.NET
* Random.cs: fixed serialization compatibility with MS.NET

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

mcs/class/corlib/System/AppDomainSetup.cs
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/ExecutionEngineException.cs
mcs/class/corlib/System/InvalidProgramException.cs
mcs/class/corlib/System/MulticastNotSupportedException.cs
mcs/class/corlib/System/ObsoleteAttribute.cs
mcs/class/corlib/System/Random.cs

index e65abedbd999e0c7f92fd84fe4c3f1959ea08c90..8f7e8c9517e10262bd4c3c3faabb24ec2717de13 100755 (executable)
@@ -38,6 +38,7 @@ namespace System
 {
        [Serializable]
        [ClassInterface (ClassInterfaceType.None)]
+       [MonoTODO ("Fix serialization compatibility with MS.NET")]
        public sealed class AppDomainSetup : IAppDomainSetup
        {
                string application_base;
index e424ad437b36d953316850636d6f4ae6f98a71ee..1eca62a54379b4b8acb7c027455c2dcd71d2cbdc 100644 (file)
@@ -1,9 +1,17 @@
+2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
 
-Tue Jun 15 15:15:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
+       * AppDomainSetup.cs: added TODO for serialization
+       * ExecutionEngineException.cs: added missing serialization ctor
+       * InvalidProgramException.cs: added missing serialization ctor
+       * MulticastNotSupportedException.cs: added missing serialization ctor
+       * ObsoleteAttribute.cs: fixed serialization compatibility with MS.NET
+       * Random.cs: fixed serialization compatibility with MS.NET
+
+2004-06-15  Paolo Molaro <lupus@ximian.com>
 
        * Type.cs: removed unused (and non-existing) icall type_is_instance.
 
-2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+2004-06-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Environment.cs: use internalGetHome instead of getting "HOME" as
        that variable may not be defined.
index 75f651defdcf2c44a537838a5259ea8da6e8faaf..4d672e7116c5ef357db322a021603fb9d0680fe2 100644 (file)
@@ -30,6 +30,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.Serialization;
+
 namespace System
 {
        [Serializable]
@@ -50,5 +52,9 @@ namespace System
                        : base (message, innerException)
                {
                }
+
+               internal ExecutionEngineException (SerializationInfo info, StreamingContext context) : base(info, context)
+               {
+               }
        }
 }
index 12754b52c1473793b816b48de0cad9019e97ef7e..ea78c883d6e36da8aa244cb48a70a7d8e9eb0ada 100644 (file)
@@ -30,6 +30,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.Serialization;
+
 namespace System
 {
        [Serializable]
@@ -50,5 +52,9 @@ namespace System
                        : base (message, inner)
                {
                }
+
+               internal InvalidProgramException (SerializationInfo info, StreamingContext context) : base(info, context)
+               {
+               }
        }
 }
index 34ce9b3e66b28804fa7fd4d41f864c879e5dbed7..a05f15aa89e0867c0fffc1ea8fee79d1f690017b 100644 (file)
@@ -30,6 +30,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.Serialization;
+
 namespace System
 {
        [Serializable]
@@ -50,5 +52,9 @@ namespace System
                        : base (message, inner)
                {
                }
+
+               internal MulticastNotSupportedException (SerializationInfo info, StreamingContext context) : base(info, context)
+               {
+               }
        }
 }
index a94306374596e6ba494d82f2c0664ddc5191048c..7e9596288cf0e505852fb9741a0a24339400e6cc 100644 (file)
@@ -41,8 +41,8 @@ namespace System
        [Serializable]
        public sealed class ObsoleteAttribute : Attribute
        {
-               private string message;
-               private bool isError = false;
+               private string _message;
+               private bool _error;
 
                //       Constructors
                public ObsoleteAttribute ()
@@ -52,22 +52,22 @@ namespace System
 
                public ObsoleteAttribute (string message)
                {
-                       this.message = message;
+                       _message = message;
                }
 
                public ObsoleteAttribute (string message, bool error)
                {
-                       this.message = message;
-                       this.isError = error;
+                       _message = message;
+                       _error = error;
                }
 
                // Properties
                public string Message {
-                       get { return message; }
+                       get { return _message; }
                }
 
                public bool IsError {
-                       get { return isError; }
+                       get { return _error; }
                }
        }
 }
index 5e3116e7c6435c55201f12960a929c31bf1f7265..3bc3e23498bdbfb5bd566a536dfcad491ebac36f 100644 (file)
@@ -42,7 +42,7 @@ namespace System
                const int MZ = 0;
 
                int inext, inextp;
-               int [] ma = new int [56];
+               int [] SeedArray = new int [56];
                
                public Random ()
                        : this (Environment.TickCount)
@@ -56,21 +56,21 @@ namespace System
 
                        // Numerical Recipes in C online @ http://www.library.cornell.edu/nr/bookcpdf/c7-1.pdf
                        mj = MSEED - Math.Abs (Seed);
-                       ma [55] = mj;
+                       SeedArray [55] = mj;
                        mk = 1;
                        for (int i = 1; i < 55; i++) {  //  [1, 55] is special (Knuth)
                                ii = (21 * i) % 55;
-                               ma [ii] = mk;
+                               SeedArray [ii] = mk;
                                mk = mj - mk;
                                if (mk < 0)
                                        mk += MBIG;
-                               mj = ma[ii];
+                               mj = SeedArray [ii];
                        }
                        for (int k = 1; k < 5; k++) {
                                for (int i = 1; i < 56; i++) {
-                                       ma [i] -= ma [1 + (i + 30) % 55];
-                                       if (ma [i] < 0)
-                                               ma [i] += MBIG;
+                                       SeedArray [i] -= SeedArray [1 + (i + 30) % 55];
+                                       if (SeedArray [i] < 0)
+                                               SeedArray [i] += MBIG;
                                }
                        }
                        inext = 0;
@@ -84,12 +84,12 @@ namespace System
                        if (++inext  >= 56) inext  = 1;
                        if (++inextp >= 56) inextp = 1;
 
-                       retVal = ma [inext] - ma [inextp];
+                       retVal = SeedArray [inext] - SeedArray [inextp];
 
                        if (retVal < 0)
                                retVal += MBIG;
 
-                       ma [inext] = retVal;
+                       SeedArray [inext] = retVal;
 
                        return retVal * (1.0 / MBIG);
                }