This attribute class associates a SecurityAction, for example, Demand, with a custom security attribute.
The types that derive from CodeAccessSecurityAttribute are used to help restrict access to resources or securable operations.
The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. Use the corresponding permission class derived from CodeAccessPermission for imperative security.
Notes to Inheritors
All permission attributes derived from this class must have only a single constructor that takes a SecurityAction as its only parameter.