Specifies the security actions that can be performed using declarative security.
[Visual Basic] <Serializable> Public Enum SecurityAction [C#] [Serializable] public enum SecurityAction [C++] [Serializable] __value public enum SecurityAction [JScript] public Serializable enum SecurityAction
The following table describes the time that each of the security actions takes place and the targets that each supports.
|Declaration of security action||Time of action||Targets supported|
|LinkDemand||Just-in-time compilation||Class, Method|
|InheritanceDemand||Load time||Class, Method|
|Demand||Run time||Class, Method|
|Assert||Run time||Class, Method|
|Deny||Run time||Class, Method|
|PermitOnly||Run time||Class, Method|
For additional information about attribute targets, see Attribute.
|Assert||The calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource (see Assert).|
|Demand||All callers higher in the call stack are required to have been granted the permission specified by the current permission object (see Security Demands).|
|Deny||The ability to access the resource specified by the current permission object is denied to callers, even if they have been granted permission to access it (see Deny).|
|InheritanceDemand||The derived class inheriting the class or overriding a method is required to have been granted the specified permission.|
|LinkDemand||The immediate caller is required to have been granted the specified permission.
For more information on declarative security and link demands, see Declarative Security Used with Class and Member Scope.
|PermitOnly||Only the resources specified by this permission object can be accessed, even if the code has been granted permission to access other resources (see PermitOnly).|
|RequestMinimum||The request for the minimum permissions required for code to run. This action can only be used within the scope of the assembly.|
|RequestOptional||The request for additional permissions that are optional (not required to run). This action can only be used within the scope of the assembly.|
|RequestRefuse||The request that permissions that might be misused will not be granted to the calling code. This action can only be used within the scope of the assembly.|
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)