Merge pull request #3059 from lateralusX/jlorenss/win-x64-dyncall-gsharedvt-support
[mono.git] / mcs / class / corlib / System.Reflection / MonoMethod.cs
index 1c0e73c485f4aee2d3f7e35a2b67a4d6737f5d0f..c93233dfffb57af19d0eaa9cc7092a2125e01739 100644 (file)
@@ -438,7 +438,7 @@ namespace System.Reflection {
                        foreach (Type type in methodInstantiation) {
                                if (type == null)
                                        throw new ArgumentNullException ();
-                               if (!(type is MonoType))
+                               if (!(type is RuntimeType))
                                        hasUserType = true;
                        }
 
@@ -502,9 +502,16 @@ namespace System.Reflection {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                //seclevel { transparent = 0, safe-critical = 1, critical = 2}
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
+#endif
 
                public override bool IsSecurityTransparent {
                        get { return get_core_clr_security_level () == 0; }
@@ -752,8 +759,15 @@ namespace System.Reflection {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
 
+#if MOBILE
+               static int get_core_clr_security_level ()
+               {
+                       return 1;
+               }
+#else
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern int get_core_clr_security_level ();
+#endif
 
                public override bool IsSecurityTransparent {
                        get { return get_core_clr_security_level () == 0; }