2006-07-15 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / class / corlib / System.Runtime.CompilerServices / RuntimeHelpers.cs
index 0ee4fa253a66205d19be6102020a6f407fec1707..aba41780aa536da566c498c79c047d49d606abfb 100644 (file)
@@ -34,10 +34,22 @@ using System.Runtime.ConstrainedExecution;
 
 namespace System.Runtime.CompilerServices
 {
+#if NET_2_0
+       public static class RuntimeHelpers
+#else
        [Serializable]
        public sealed class RuntimeHelpers
+#endif
        {
+#if NET_2_0
+               public delegate void TryCode (Object userData);
+
+               public delegate void CleanupCode (Object userData, bool exceptionThrown);
+#endif
+
+#if !NET_2_0
                private RuntimeHelpers () {}
+#endif
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                static extern void InitializeArray (Array array, IntPtr fldHandle);
@@ -86,11 +98,28 @@ namespace System.Runtime.CompilerServices
 
 #if NET_2_0
                [MonoTODO]
-               [ReliabilityContract (Consistency.WillNotCorruptState, CER.MayFail)]
+               public static void ExecuteCodeWithGuaranteedCleanup (TryCode code, CleanupCode backoutCode, Object userData) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
                public static void PrepareConstrainedRegions () {
                        throw new NotImplementedException ();
                }
 
+               [MonoTODO]
+               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
+               public static void PrepareConstrainedRegionsNoOP () {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
+               public static void ProbeForSufficientStack() {
+                       throw new NotImplementedException ();
+               }
+
                [MonoTODO]
                public static void PrepareDelegate (Delegate d) {
                        if (d == null)
@@ -107,6 +136,11 @@ namespace System.Runtime.CompilerServices
                public static void PrepareMethod (RuntimeMethodHandle method, RuntimeTypeHandle[] instantiation) {
                        throw new NotImplementedException ();
                }
+
+               [MonoTODO]
+               public static void RunModuleConstructor (ModuleHandle module) {
+                       throw new NotImplementedException ();
+               }
 #endif
        }
 }