System.Security.CodeAccessPermission Class

Defines the underlying structure of all code access permissions.

See Also: CodeAccessPermission Members


public abstract class CodeAccessPermission : IPermission, IStackWalk


Code access permissions use a stack walk to ensure that all callers of the code have been granted a permission. If a permission object is null, it is handled the same as a permission object with the state System.Security.Permissions.PermissionState.None.

The call stack is typically represented as growing down, so that methods higher in the call stack call methods lower in the call stack.

Inheritors of the System.Security.CodeAccessPermission class must be granted full trust to function correctly as permissions extending the security infrastructure. To determine that the inheritors are fully trusted, System.Security.CodeAccessPermission issues an System.Security.Permissions.SecurityAction.InheritanceDemand for System.Security.Permissions.SecurityPermissionFlag.ControlEvidence = true and System.Security.Permissions.SecurityPermissionFlag.ControlPolicy = true.

For more information on inheritance demands, see Inheritance Demands.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.


Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,