// NOTE: This method doesn't show in the class library status page because
// it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
// But it's there!
- [MonoTODO ("works for fulltrust (empty), documentation doesn't really make sense, type wise")]
+ // FIXME works for fulltrust (empty), documentation doesn't really make sense, type wise
+ [MonoTODO ("CAS support is experimental (and unsupported). This method only works in FullTrust.")]
[StrongNameIdentityPermission (SecurityAction.LinkDemand, PublicKey = "0x00000000000000000400000000000000")]
public static void GetZoneAndOrigin (out ArrayList zone, out ArrayList origin)
{
}
// we try to provide as much details as possible to help debugging
- private static void LinkDemandSecurityException (int securityViolation, Assembly a, MethodInfo method)
+ private static void LinkDemandSecurityException (int securityViolation, IntPtr methodHandle)
{
+ RuntimeMethodHandle runtimeHandle = new RuntimeMethodHandle (methodHandle);
+ MethodInfo method = (MethodInfo)(MethodBase.GetMethodFromHandle (runtimeHandle));
+ Assembly a = method.DeclaringType.Assembly;
+
string message = null;
AssemblyName an = null;
PermissionSet granted = null;
throw new SecurityException (message, an, granted, refused, method, SecurityAction.InheritanceDemand, null, null, null);
}
+#if NET_2_1
+ private static void MethodAccessException (IntPtr caller, IntPtr callee)
+ {
+ throw new MethodAccessException (Locale.GetText ("Method call not allowed."));
+ }
+
+ private static void VerificationException ()
+ {
+ throw new VerificationException (Locale.GetText ("Unsafe code encountered."));
+ }
+#endif
+
// internal - get called by the class loader
// Called when