ClaimsPrincipalPermission.IsSubsetOf(IPermission) 方法
定义
返回一个值,该值指示当前权限是否为指定权限的一个子集。Returns a value that indicates whether current permission is a subset of the specified permission.
public:
virtual bool IsSubsetOf(System::Security::IPermission ^ target);
public bool IsSubsetOf (System.Security.IPermission target);
abstract member IsSubsetOf : System.Security.IPermission -> bool
override this.IsSubsetOf : System.Security.IPermission -> bool
Public Function IsSubsetOf (target As IPermission) As Boolean
参数
- target
- IPermission
对其子集关系测试的权限。The permission to be tested for the subset relationship. 必须为 ClaimsPrincipalPermission 的实例。It must be an instance of ClaimsPrincipalPermission.
返回
如果当前权限是指定权限的子集,则为 true;否则为 false。true if current permission is a subset of the specified permission; otherwise, false.
实现
注解
如果当前权限中包含的所有资源操作对也存在于指定权限中,则当前权限是指定权限的子集。The current permission is a subset of the specified permission if all of the resource-action pairs contained in the current permission are also present in the specified permission. 如果 target 为 null 或不是的实例 ClaimsPrincipalPermission ,则 IsSubsetOf 返回 false 。If target is null or is not an instance of ClaimsPrincipalPermission, the IsSubsetOf returns false.