See Also: SecurityPermissionAttribute Members
System.Object
System.Attribute
System.Security.Permissions.SecurityAttribute
System.Security.Permissions.CodeAccessSecurityAttribute
System.Security.Permissions.SecurityPermissionAttribute
All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.
Note:The security permissions are defined in the System.Security.Permissions.SecurityPermissionFlag enumeration and are specified using the SecurityPermissionAttribute.Flags property.
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 for declarative security only. For imperative security, use the corresponding permission class, System.Security.Permissions.SecurityPermission.
The allowable System.Security.Permissions.SecurityPermissionAttribute targets are determined by the System.Security.Permissions.SecurityAction passed to the constructor.
In the following example, the attribute target is an assembly. The attribute declares that the ability to assert permissions on behalf of callers is the minimum permission required for the assembly to execute.
[assembly:SecurityPermissionAttribute(SecurityAction.RequestMinimum, Assertion=true)]
Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0