Author: zoltan
Date: 2005-06-06 10:12:38 -0400 (Mon, 06 Jun 2005)
New Revision: 45487

Modified:
   trunk/mcs/class/corlib/System/AppDomain.cs
   trunk/mcs/class/corlib/System/GC.cs
   trunk/mcs/class/corlib/System/IntPtr.cs
   trunk/mcs/class/corlib/System/Math.cs
   trunk/mcs/class/corlib/System/ModuleHandle.cs
   trunk/mcs/class/corlib/System/Object.cs
   trunk/mcs/class/corlib/System/RuntimeFieldHandle.cs
   trunk/mcs/class/corlib/System/RuntimeMethodHandle.cs
   trunk/mcs/class/corlib/System/RuntimeTypeHandle.cs
   trunk/mcs/class/corlib/System/String.cs
   trunk/mcs/class/corlib/System/UnhandledExceptionEventArgs.cs
Log:
2005-06-06  Zoltan Varga  <[EMAIL PROTECTED]>

        * GC.cs UnhandledExceptionEventArgs.cs IntPtr.cs RuntimeFieldHandle.cs 
          String.cs Object.cs Math.cs RuntimeMethodHandle.cs ModuleHandle.cs 
          RuntimeTypeHandle.cs AppDomain.cs: Add some missing 2.0 
methods/attributes.


Modified: trunk/mcs/class/corlib/System/AppDomain.cs
===================================================================
--- trunk/mcs/class/corlib/System/AppDomain.cs  2005-06-06 14:02:04 UTC (rev 
45486)
+++ trunk/mcs/class/corlib/System/AppDomain.cs  2005-06-06 14:12:38 UTC (rev 
45487)
@@ -50,6 +50,10 @@
 using System.Security.Principal;
 using System.Configuration.Assemblies;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System
 {
        [ClassInterface(ClassInterfaceType.None)]
@@ -769,6 +773,9 @@
                }
 
                [SecurityPermission (SecurityAction.Demand, ControlAppDomain = 
true)]
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.MayCorruptAppDomain, 
Cer.MayFail)]
+#endif
                public static void Unload (AppDomain domain)
                {
                        if (domain == null)
@@ -999,6 +1006,9 @@
                }
 
                public int Id {
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                        get { return getDomainID (); }
                }
 

Modified: trunk/mcs/class/corlib/System/GC.cs
===================================================================
--- trunk/mcs/class/corlib/System/GC.cs 2005-06-06 14:02:04 UTC (rev 45486)
+++ trunk/mcs/class/corlib/System/GC.cs 2005-06-06 14:12:38 UTC (rev 45487)
@@ -102,6 +102,22 @@
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                public extern static void WaitForPendingFinalizers ();
-               
+
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+               [MonoTODO]
+               public static int CollectionCount (int generation) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void AddMemoryPressure (long bytesAllocated) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public static void RemoveMemoryPressure (long bytesAllocated) {
+                       throw new NotImplementedException ();
+               }
+
        }
 }

Modified: trunk/mcs/class/corlib/System/IntPtr.cs
===================================================================
--- trunk/mcs/class/corlib/System/IntPtr.cs     2005-06-06 14:02:04 UTC (rev 
45486)
+++ trunk/mcs/class/corlib/System/IntPtr.cs     2005-06-06 14:12:38 UTC (rev 
45487)
@@ -86,6 +86,9 @@
                }
 
                public static int Size {
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                        get {
                                return sizeof (void *);
                        }
@@ -129,6 +132,9 @@
                }
 
                [CLSCompliant (false)]
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                unsafe public void *ToPointer ()
                {
                        return value;

Modified: trunk/mcs/class/corlib/System/Math.cs
===================================================================
--- trunk/mcs/class/corlib/System/Math.cs       2005-06-06 14:02:04 UTC (rev 
45486)
+++ trunk/mcs/class/corlib/System/Math.cs       2005-06-06 14:12:38 UTC (rev 
45487)
@@ -463,6 +463,9 @@
                public extern static double Pow (double x, double y);
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public extern static double Sqrt (double x);
        }
 }

Modified: trunk/mcs/class/corlib/System/ModuleHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System/ModuleHandle.cs       2005-06-06 14:02:04 UTC 
(rev 45486)
+++ trunk/mcs/class/corlib/System/ModuleHandle.cs       2005-06-06 14:12:38 UTC 
(rev 45487)
@@ -36,6 +36,8 @@
 
 #if NET_2_0
 
+using System.Runtime.ConstrainedExecution;
+
 namespace System
 {
        [CLSCompliant (false)]
@@ -116,6 +118,9 @@
                        return ResolveTypeHandle (typeToken);
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public override bool Equals (object obj)
                {
                        if (obj == null || GetType () != obj.GetType ())
@@ -124,6 +129,9 @@
                        return value == ((ModuleHandle)obj).Value;
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public bool Equals (ModuleHandle handle)
                {
                        return value == handle.Value;

Modified: trunk/mcs/class/corlib/System/Object.cs
===================================================================
--- trunk/mcs/class/corlib/System/Object.cs     2005-06-06 14:02:04 UTC (rev 
45486)
+++ trunk/mcs/class/corlib/System/Object.cs     2005-06-06 14:12:38 UTC (rev 
45487)
@@ -34,6 +34,10 @@
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System {
 
        [Serializable]
@@ -73,6 +77,9 @@
                // <summary>
                //   Object destructor. 
                // </summary>
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                ~Object ()
                {
                }
@@ -114,6 +121,9 @@
                //   Tests whether a is equal to b.
                //   Can not figure out why this even exists
                // </summary>
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public static bool ReferenceEquals (object a, object b)
                {
                        return (a == b);

Modified: trunk/mcs/class/corlib/System/RuntimeFieldHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System/RuntimeFieldHandle.cs 2005-06-06 14:02:04 UTC 
(rev 45486)
+++ trunk/mcs/class/corlib/System/RuntimeFieldHandle.cs 2005-06-06 14:12:38 UTC 
(rev 45487)
@@ -34,6 +34,10 @@
 using System.Reflection;
 using System.Runtime.Serialization;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System
 {
        [MonoTODO ("Serialization needs tests")]
@@ -72,7 +76,9 @@
                        info.AddValue ("FieldObj", (MonoField) 
FieldInfo.GetFieldFromHandle (this), typeof (MonoField));
                }
 
-
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public override bool Equals (object obj)
                {
                        if (obj == null || GetType () != obj.GetType ())
@@ -81,6 +87,9 @@
                        return value == ((RuntimeFieldHandle)obj).Value;
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public bool Equals (RuntimeFieldHandle handle)
                {
                        return value == handle.Value;

Modified: trunk/mcs/class/corlib/System/RuntimeMethodHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System/RuntimeMethodHandle.cs        2005-06-06 
14:02:04 UTC (rev 45486)
+++ trunk/mcs/class/corlib/System/RuntimeMethodHandle.cs        2005-06-06 
14:12:38 UTC (rev 45487)
@@ -33,6 +33,10 @@
 using System.Runtime.CompilerServices;
 using System.Security.Permissions;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System
 {
        [MonoTODO ("Serialization needs tests")]
@@ -81,6 +85,9 @@
                        return GetFunctionPointer (value);
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public override bool Equals (object obj)
                {
                        if (obj == null || GetType () != obj.GetType ())
@@ -89,6 +96,9 @@
                        return value == ((RuntimeMethodHandle)obj).Value;
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public bool Equals (RuntimeMethodHandle handle)
                {
                        return value == handle.Value;

Modified: trunk/mcs/class/corlib/System/RuntimeTypeHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System/RuntimeTypeHandle.cs  2005-06-06 14:02:04 UTC 
(rev 45486)
+++ trunk/mcs/class/corlib/System/RuntimeTypeHandle.cs  2005-06-06 14:12:38 UTC 
(rev 45487)
@@ -33,6 +33,10 @@
 
 using System.Runtime.Serialization;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System
 {
        [MonoTODO ("Serialization needs tests")]
@@ -71,7 +75,9 @@
                        info.AddValue ("TypeObj", Type.GetTypeHandle (this), 
typeof (MonoType));
                }
 
-
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public override bool Equals (object obj)
                {
                        if (obj == null || GetType () != obj.GetType ())
@@ -80,6 +86,9 @@
                        return value == ((RuntimeTypeHandle)obj).Value;
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                public bool Equals (RuntimeTypeHandle handle)
                {
                        return value == handle.Value;
@@ -92,6 +101,7 @@
 
 #if NET_2_0
                [CLSCompliant (false)]
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
                public ModuleHandle GetModuleHandle () {
                        return Type.GetTypeFromHandle 
(this).Module.ModuleHandle;
                }

Modified: trunk/mcs/class/corlib/System/String.cs
===================================================================
--- trunk/mcs/class/corlib/System/String.cs     2005-06-06 14:02:04 UTC (rev 
45486)
+++ trunk/mcs/class/corlib/System/String.cs     2005-06-06 14:12:38 UTC (rev 
45487)
@@ -36,6 +36,10 @@
 using System.Globalization;
 using System.Runtime.CompilerServices;
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System
 {
        [Serializable]
@@ -101,11 +105,17 @@
                        return !Equals (a, b);
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.MayFail)]
+#endif
                public override bool Equals (Object obj)
                {
                        return Equals (this, obj as String);
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.MayFail)]
+#endif
                public bool Equals (String value)
                {
                        return Equals (this, value);
@@ -1496,6 +1506,9 @@
                        }
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.MayFail)]
+#endif
                public unsafe override int GetHashCode ()
                {
                        fixed (char * c = this) {

Modified: trunk/mcs/class/corlib/System/UnhandledExceptionEventArgs.cs
===================================================================
--- trunk/mcs/class/corlib/System/UnhandledExceptionEventArgs.cs        
2005-06-06 14:02:04 UTC (rev 45486)
+++ trunk/mcs/class/corlib/System/UnhandledExceptionEventArgs.cs        
2005-06-06 14:12:38 UTC (rev 45487)
@@ -30,6 +30,10 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NET_2_0
+using System.Runtime.ConstrainedExecution;
+#endif
+
 namespace System 
 {
        [Serializable]
@@ -45,12 +49,18 @@
                }
 
                public object ExceptionObject {
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                        get {
                                return exception;
                        }
                }
 
                public bool IsTerminating {
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, 
Cer.Success)]
+#endif
                        get {
                                return m_isTerminating;
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to