DeclarativeSecurityAction 枚举

定义

指定可以使用声明性安全执行的安全操作。Specifies the security actions that can be performed using declarative security.

public enum class DeclarativeSecurityAction
public enum DeclarativeSecurityAction
type DeclarativeSecurityAction = 
Public Enum DeclarativeSecurityAction
继承
DeclarativeSecurityAction

字段

Assert 3

即使堆栈中的高级调用方未被授限访问当前权限对象所标识的资源,调用代码仍能访问该资源。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.

Demand 2

检查调用链中的所有调用方是否已被授予指定的权限。Check that all callers in the call chain have been granted the specified permission.

Deny 4

如果不进行进一步检查,则拒绝对指定权限的需求。Without further checks refuse Demand for the specified permission.

InheritanceDemand 7

要求继承此类或重写方法的派生的类已具有指定的权限。The derived class inheriting the class or overriding a method is required to have the specified permission.

LinkDemand 6

检查直接调用方是否已被授予指定的权限。Check that the immediate caller has been granted the specified permission.

None 0

无声明性安全操作。No declarative security action.

PermitOnly 5

如果不进行进一步检查,则拒绝对除指定权限之外的所有其他权限的需求。Without further checks, refuse the demand for all permissions other than those specified.

RequestMinimum 8

请求代码运行所需的最低权限。Request the minimum permissions required for code to run. 此操作仅可以在程序集的作用域内使用。This action can only be used within the scope of the assembly.

RequestOptional 9

请求可选的其他权限(不要求运行)。Request additional permissions that are optional (not required to run). 此请求隐式拒绝所有未明确请求的其他权限。This request implicitly refuses all other permissions not specifically requested. 此操作仅可以在程序集的作用域内使用。This action can only be used within the scope of the assembly.

RequestRefuse 10

可能被误用的权限将不授予给调用代码的请求。Request that permissions that might be misused not be granted to the calling code. 此操作仅可以在程序集的作用域内使用。This action can only be used within the scope of the assembly.

适用于