2008-07-06 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
authorAndreas N <andreas@mono-cvs.ximian.com>
Sun, 6 Jul 2008 13:01:36 +0000 (13:01 -0000)
committerAndreas N <andreas@mono-cvs.ximian.com>
Sun, 6 Jul 2008 13:01:36 +0000 (13:01 -0000)
* GCLatencyMode.cs: Add missing attribute
* GCSettings.cs: Provide default data instead of throwing, add missing attrbutes,
enhance/add description texts

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

mcs/class/corlib/System.Runtime/ChangeLog
mcs/class/corlib/System.Runtime/GCLatencyMode.cs
mcs/class/corlib/System.Runtime/GCSettings.cs

index 4e3dc12dd0a2a4ae61591cf45a0685aab99791ef..a675fb9881fcd43e5d1af959d736a398bf841e03 100644 (file)
@@ -1,3 +1,9 @@
+2008-07-06  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
+
+       * GCLatencyMode.cs: Add missing attribute
+       * GCSettings.cs: Provide default data instead of throwing, add missing attrbutes, 
+       enhance/add description texts
+
 2007-11-21  Atsushi Enomoto  <atsushi@ximian.com>
 
        * GCSettings.cs, MemoryFailPoint.cs : initial checkin (stubs).
index 63d65893bd5e01872564c333a1eb0d35a478c2ed..c9883ab0c2f479c6df15e4b52c5c0990d32bb1b3 100644 (file)
@@ -1,5 +1,5 @@
 //
-// System.GCCollectionMode.cs
+// System.Runtime.GCLatencyMode.cs
 //
 
 //
@@ -31,7 +31,9 @@
 
 namespace System.Runtime
 {
-       public enum GCLatencyMode {
+       [Serializable]
+       public enum GCLatencyMode
+       {
                Batch = 0,
                Interactive = 1,
                LowLatency = 2
index 75c409236860e0de6cd3e01eb346fd2e7f5f536d..2b3dbe7d4ade0b0b58b2687d5400e152a44bdc9f 100644 (file)
@@ -1,5 +1,5 @@
 //
-// GCSettings.cs
+// System.Runtime.GCSettings.cs
 //
 // Author:
 //     Atsushi Enomoto  <atsushi@ximian.com>
 
 #if NET_2_0
 
-using System.Runtime.InteropServices;
+using System.Runtime.ConstrainedExecution;
 
 namespace System.Runtime
 {
        public static class GCSettings
        {
-               [MonoTODO]
+               [MonoTODO ("Always returns false")]
                public static bool IsServerGC {
-                       get { throw new NotImplementedException (); }
+                       get { return false; }
                }
 
-               [MonoTODO (".NET 2.0 SP1 member")]
+               [MonoTODO ("Always returns GCLatencyMode.Interactive and ignores set (.NET 2.0 SP1 member)")]
                public static GCLatencyMode LatencyMode {
-                       get { throw new NotImplementedException (); }
-                       set { throw new NotImplementedException (); }
+                       [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
+                       get { return GCLatencyMode.Interactive; }
+                       [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
+                       set { ; }
                }
        }
 }