ClaimSet.ContainsClaim 方法

定義

判斷 ClaimSet 是否包含指定的 ClaimDetermines whether the ClaimSet contains the specified Claim.

多載

ContainsClaim(Claim)

判斷 ClaimSet 是否包含指定的 ClaimDetermines whether the ClaimSet contains the specified Claim.

ContainsClaim(Claim, IEqualityComparer<Claim>)

使用指定的 ClaimSet 物件,判斷 Claim 是否包含指定的 IEqualityComparer<T>Determines whether the ClaimSet contains the specified Claim, by using the specified IEqualityComparer<T> object.

ContainsClaim(Claim)

判斷 ClaimSet 是否包含指定的 ClaimDetermines whether the ClaimSet contains the specified Claim.

public:
 virtual bool ContainsClaim(System::IdentityModel::Claims::Claim ^ claim);
public virtual bool ContainsClaim (System.IdentityModel.Claims.Claim claim);
abstract member ContainsClaim : System.IdentityModel.Claims.Claim -> bool
override this.ContainsClaim : System.IdentityModel.Claims.Claim -> bool

參數

claim
Claim

要搜尋的 ClaimThe Claim for which to search.

傳回

如果指定的宣告包含在 true 則為 ClaimSet,否則為 falsetrue if the specified claim is contained in the ClaimSet; otherwise false.

備註

若要尋找指定的宣告,請呼叫 FindClaims(String, String) 方法。To find the specified claim, call the FindClaims(String, String) method.

ContainsClaim(Claim, IEqualityComparer<Claim>)

使用指定的 ClaimSet 物件,判斷 Claim 是否包含指定的 IEqualityComparer<T>Determines whether the ClaimSet contains the specified Claim, by using the specified IEqualityComparer<T> object.

public:
 virtual bool ContainsClaim(System::IdentityModel::Claims::Claim ^ claim, System::Collections::Generic::IEqualityComparer<System::IdentityModel::Claims::Claim ^> ^ comparer);
public virtual bool ContainsClaim (System.IdentityModel.Claims.Claim claim, System.Collections.Generic.IEqualityComparer<System.IdentityModel.Claims.Claim> comparer);
abstract member ContainsClaim : System.IdentityModel.Claims.Claim * System.Collections.Generic.IEqualityComparer<System.IdentityModel.Claims.Claim> -> bool
override this.ContainsClaim : System.IdentityModel.Claims.Claim * System.Collections.Generic.IEqualityComparer<System.IdentityModel.Claims.Claim> -> bool

參數

claim
Claim

要搜尋的 ClaimThe Claim for which to search.

comparer
IEqualityComparer<Claim>

用來進行比較的 IEqualityComparer<T> 物件。The IEqualityComparer<T> object used to make the comparison.

傳回

如果指定的宣告包含在 ClaimSet 則為 true,否則為 false.true if the specified claim is contained in the ClaimSet; otherwise false.

備註

若要尋找指定的宣告,請呼叫 FindClaims(String, String) 方法。To find the specified claim, call the FindClaims(String, String) method.

適用於