A link demand causes a security check during JIT compilation and check only the immediate calling assembly of the decorated method.
If the calling assembly does not have sufficient permissions to link to the method, the link is not allowed and a RTE is thrown when the code is loaded and run.
Link demands can be overriden in inherited classes.
A full stack walk is not performed and the code is susceptible to luring attacks.
A link demand applied to a static constructor is ignored (the static constructor is called by the runtime).
Advertisements