You'll probably need to not define the refusal on the assembly but deny
access to your methods programmatically. I believe the assembly level
refusal will be enforced by the runtime and you'll never get a chance to
"opt out" in your code. I don't think there is a runtime API to fiddle with
your as
Lets say I have:
Assembly A thas has custom permission P1.
Assembly A defines class AC;
Assembly B that is refused custom permission P1.
Assembly B defines class BC;
At runtime instance of AC deems that a certain instance of BC should be
treated as safe and wants to grant it permission P1, so in