diff --git a/mcs/class/corlib/ReferenceSources/RuntimeType.cs b/mcs/class/corlib/ReferenceSources/RuntimeType.cs index ce498cb17c52d..bedcf1af0c14a 100644 --- a/mcs/class/corlib/ReferenceSources/RuntimeType.cs +++ b/mcs/class/corlib/ReferenceSources/RuntimeType.cs @@ -602,6 +602,12 @@ bool IsGenericCOMObjectImpl () get; } +#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 (); @@ -616,6 +622,7 @@ bool IsGenericCOMObjectImpl () public override bool IsSecuritySafeCritical { get { return get_core_clr_security_level () == 1; } - } + } +#endif } } diff --git a/mcs/class/corlib/System.Reflection/MonoField.cs b/mcs/class/corlib/System.Reflection/MonoField.cs index 8c6f92469380c..ef2180fed03d6 100644 --- a/mcs/class/corlib/System.Reflection/MonoField.cs +++ b/mcs/class/corlib/System.Reflection/MonoField.cs @@ -296,6 +296,12 @@ internal MonoField Clone (string newName) throw new InvalidOperationException ("Late bound operations cannot be performed on fields with types for which Type.ContainsGenericParameters is true."); } +#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 (); @@ -311,5 +317,6 @@ internal MonoField Clone (string newName) public override bool IsSecuritySafeCritical { get { return get_core_clr_security_level () == 1; } } +#endif } } diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs index 1c0e73c485f4a..04c0c56708632 100644 --- a/mcs/class/corlib/System.Reflection/MonoMethod.cs +++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs @@ -502,9 +502,16 @@ public override MethodInfo GetGenericMethodDefinition () 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 @@ public override Object Invoke (BindingFlags invokeAttr, Binder binder, Object[] 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; }