SiteIdentityPermission.IsSubsetOf(IPermission) 方法

定义

确定当前权限是否为指定权限的子集。

public:
 override bool IsSubsetOf(System::Security::IPermission ^ target);
public override bool IsSubsetOf (System.Security.IPermission target);
override this.IsSubsetOf : System.Security.IPermission -> bool
Public Overrides Function IsSubsetOf (target As IPermission) As Boolean

参数

target
IPermission

将要测试子集关系的权限。 此权限必须与当前权限属于同一类型。

返回

如果当前权限是指定权限的子集,则为 true;否则为 false

例外

target 参数不为 null,并且与当前权限不属于同一类型。

注解

如果当前权限指定由指定权限完全包含的网站,则当前权限是指定权限的子集。

下表显示了 IsSubsetOf 当前权限的值范围和指定权限的值。

当前权限 指定权限 IsSubsetOf
www.fourthcoffee.com www.fourthcoffee.com true
www.fourthcoffee.com www.tailspintoys.com false
www.fourthcoffee.com *.fourthcoffee.com true
www.fourthcoffee.com *.com true
*.fourthcoffee.com www.fourthcoffee.com false
*.fourthcoffee.com *.fourthcoffee.com true
*.fourthcoffee.com *.com true
None * true
None 任意 true

适用于