2005-06-09 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / corlib / System / ModuleHandle.cs
index 9f90c7a305444298d0b7d90a6bf9ce6368d6510e..98bc38156e1ba45c380e0f35e592433e45a3e23f 100644 (file)
 using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 #if NET_2_0
 
+using System.Runtime.ConstrainedExecution;
+
 namespace System
 {
-       [CLSCompliant (false)]
+       [ComVisible (true)]
        public struct ModuleHandle
        {
                IntPtr value;
@@ -56,7 +59,7 @@ namespace System
                        }
                }
 
-               public void GetPEKind (out PortableExecutableKind peKind, out ImageFileMachine machine)
+               public void GetPEKind (out PortableExecutableKinds peKind, out ImageFileMachine machine)
                {
                        if (value == IntPtr.Zero)
                                throw new ArgumentNullException (String.Empty, "Invalid handle");
@@ -116,6 +119,9 @@ namespace System
                        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 +130,9 @@ namespace System
                        return value == ((ModuleHandle)obj).Value;
                }
 
+#if NET_2_0
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
+#endif
                public bool Equals (ModuleHandle handle)
                {
                        return value == handle.Value;