Share via


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

適用於