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;
}
}
- 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");
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 ())
return value == ((ModuleHandle)obj).Value;
}
+#if NET_2_0
+ [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
+#endif
public bool Equals (ModuleHandle handle)
{
return value == handle.Value;