Author: zoltan
Date: 2007-08-28 11:07:43 -0400 (Tue, 28 Aug 2007)
New Revision: 84958

Modified:
   trunk/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog
   trunk/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
Log:
2007-08-28  Zoltan Varga  <[EMAIL PROTECTED]>

        * RuntimeHelpers.cs: Implement RunModuleConstructor ().


Modified: trunk/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog    
2007-08-28 15:05:30 UTC (rev 84957)
+++ trunk/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog    
2007-08-28 15:07:43 UTC (rev 84958)
@@ -1,3 +1,7 @@
+2007-08-28  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * RuntimeHelpers.cs: Implement RunModuleConstructor ().
+
 2007-01-22  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * RuntimeHelpers.cs: The constrained methods are safe not throwing

Modified: 
trunk/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs    
2007-08-28 15:05:30 UTC (rev 84957)
+++ trunk/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs    
2007-08-28 15:07:43 UTC (rev 84958)
@@ -30,6 +30,7 @@
 
 #if NET_2_0
 using System.Runtime.ConstrainedExecution;
+using System.Reflection;
 #endif
 
 namespace System.Runtime.CompilerServices
@@ -135,10 +136,16 @@
                {
                }
 
-               [MonoTODO("Currently a no-op")]
                public static void RunModuleConstructor (ModuleHandle module)
                {
+                       if (module == ModuleHandle.EmptyHandle)
+                               throw new ArgumentException ("Handle is not 
initialized.", "module");
+
+                       RunModuleConstructor (module.Value);
                }
+
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]
+               public static extern void RunModuleConstructor (IntPtr module);
 #endif
        }
 }

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

Reply via email to