อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


ClaimSet.ContainsClaim Method

Definition

Determines whether the ClaimSet contains the specified Claim.

Overloads

ContainsClaim(Claim)

Determines whether the ClaimSet contains the specified Claim.

ContainsClaim(Claim, IEqualityComparer<Claim>)

Determines whether the ClaimSet contains the specified Claim, by using the specified IEqualityComparer<T> object.

ContainsClaim(Claim)

Source:
ClaimSet.cs
Source:
ClaimSet.cs

Determines whether the ClaimSet contains the specified Claim.

C#
public virtual bool ContainsClaim(System.IdentityModel.Claims.Claim claim);

Parameters

claim
Claim

The Claim for which to search.

Returns

true if the specified claim is contained in the ClaimSet; otherwise false.

Remarks

To find the specified claim, call the FindClaims(String, String) method.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

ContainsClaim(Claim, IEqualityComparer<Claim>)

Source:
ClaimSet.cs
Source:
ClaimSet.cs

Determines whether the ClaimSet contains the specified Claim, by using the specified IEqualityComparer<T> object.

C#
public virtual bool ContainsClaim(System.IdentityModel.Claims.Claim claim, System.Collections.Generic.IEqualityComparer<System.IdentityModel.Claims.Claim> comparer);

Parameters

claim
Claim

The Claim for which to search.

comparer
IEqualityComparer<Claim>

The IEqualityComparer<T> object used to make the comparison.

Returns

true if the specified claim is contained in the ClaimSet; otherwise false.

Remarks

To find the specified claim, call the FindClaims(String, String) method.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)