public enum SecurityAction
Object
ValueType
Enum
SecurityAction
mscorlib
BCL
Specifies security actions that can be performed using declarative security.
[Note: For information about using declarative security and security actions, see Partition II of the CLI Specification.]
[Note: Declarative security is specified using types derived from SecurityAttribute. The following table describes the attribute targets supported by each of the security actions.
For additional information on attribute targets, see Attribute.
Security action Attribute Targets Assert Class, Method Demand Class, Method Deny Class, Method InheritanceDemand Class, Method LinkDemand Class, Method PermitOnly Class, Method RequestMinimum Assembly RequestOptional Assembly RequestRefuse Assembly ]
System.Security.Permissions Namespace
SecurityAction Fields
SecurityAction.Assert Field
SecurityAction.Demand Field
SecurityAction.Deny Field
SecurityAction.InheritanceDemand Field
SecurityAction.LinkDemand Field
SecurityAction.PermitOnly Field
SecurityAction.RequestMinimum Field
SecurityAction.RequestOptional Field
SecurityAction.RequestRefuse Field
SecurityAction.value__ Field
Assert = 3;
Specifies that callers of the code performing the assert need not have the permissions specified by the current security attribute, and that a check for any such permission can stop after the code that asserted it. [Note: An assert can change the default behavior of a security check (such as that caused by a Demand, LinkDemand, etc.).]
This action can be applied to classes and methods.
[Note: This action should only be used by code that can assure that its callers cannot manipulate it to abuse the asserted permission.]
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
Demand = 2;
Specified that all callers are required to have the permissions specified by the current security attribute.This action can be applied to classes and methods.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
Deny = 4;
Specifies that access to the resource or operation described by the current security attribute be denied to callers, even if they have been granted permission to access it. [Note: System.Security.Permissions.SecurityAction.Deny causes a security check for the permissions specified by the current security attribute to fail even when it would otherwise succeed.]
This action can be applied to classes and methods.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
InheritanceDemand = 7;
Specifies the permissions that a derived class is required to have. When the target is a class, classes inheriting from the target are required to have the permissions specified by the current security attribute. When the target is a method, classes overriding the target are required to have the permissions specified by the current security attribute.This action can be applied to classes and methods.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
LinkDemand = 6;
Specifies that the immediate caller be required to have the specified permissions.This action can be applied to classes and methods.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
PermitOnly = 5;
Specifies that access is limited to only those resources or operations specified by the current security attribute, even if the code has been granted permission to access others. A security check for a permission not described by the current security attribute fails regardless of whether or not callers have been granted this permission.This action can be applied to classes and methods.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
RequestMinimum = 8;
Specifies that the current security attribute describes the minimum permissions required for an assembly to run.This action can be applied to assemblies.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
RequestOptional = 9;
Specifies that the current security attribute describes optional permissions that an assembly can be granted.This action can be applied to assemblies.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
RequestRefuse = 10;
Specifies that the current security attribute describes resources or operations that an assembly cannot access.This action can be applied to assemblies.
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace
value__;
System.Security.Permissions.SecurityAction Enum, System.Security.Permissions Namespace