I need to wave my hand, answering this question a bit, CAS is forever difficult. The skipVisibility argument refers to trusted host applications that generate code that runs in the sandbox. In this case, it is impractical to perform checks when the method is generated, since the runtime is incorrect. This should happen when the method is executed inside the sandbox. Where it undergoes the usual sandboxed CAS checks.
Setting the argument to true actually adds the permission requirement for ReflectionPermissionFlag.MemberAccess, which is required to take a snapshot when the generated method is received.
inverted. There is some background information in this MSDN article , "Adding a RestrictedMemberAccess to Sandboxed Domains Section".
source share