Επεξεργασία

Κοινή χρήση μέσω


ClaimsPrincipal.FindAll Method

Definition

Retrieves all of the claims that match a specified condition.

Overloads

FindAll(Predicate<Claim>)

Retrieves all of the claims that are matched by the specified predicate.

FindAll(String)

Retrieves all or the claims that have the specified claim type.

FindAll(Predicate<Claim>)

Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs

Retrieves all of the claims that are matched by the specified predicate.

public:
 virtual System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ FindAll(Predicate<System::Security::Claims::Claim ^> ^ match);
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll (Predicate<System.Security.Claims.Claim> match);
abstract member FindAll : Predicate<System.Security.Claims.Claim> -> seq<System.Security.Claims.Claim>
override this.FindAll : Predicate<System.Security.Claims.Claim> -> seq<System.Security.Claims.Claim>
Public Overridable Function FindAll (match As Predicate(Of Claim)) As IEnumerable(Of Claim)

Parameters

match
Predicate<Claim>

The function that performs the matching logic.

Returns

The matching claims.

Exceptions

match is null.

Remarks

Returns claims from all identities associated with the claims principal.

Applies to

FindAll(String)

Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs
Source:
ClaimsPrincipal.cs

Retrieves all or the claims that have the specified claim type.

public:
 virtual System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ FindAll(System::String ^ type);
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll (string type);
abstract member FindAll : string -> seq<System.Security.Claims.Claim>
override this.FindAll : string -> seq<System.Security.Claims.Claim>
Public Overridable Function FindAll (type As String) As IEnumerable(Of Claim)

Parameters

type
String

The claim type against which to match claims.

Returns

The matching claims.

Exceptions

type is null.

Remarks

Returns claims from all identities associated with the claims principal. The comparison is made using Ordinal case in-sensitive on type.

Applies to