Edytuj

Udostępnij za pośrednictwem


ClaimsIdentity.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 of the claims that have the specified claim type.

FindAll(Predicate<Claim>)

Source:
ClaimsIdentity.cs
Source:
ClaimsIdentity.cs
Source:
ClaimsIdentity.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. The list is read-only.

Exceptions

match is null.

Applies to

FindAll(String)

Source:
ClaimsIdentity.cs
Source:
ClaimsIdentity.cs
Source:
ClaimsIdentity.cs

Retrieves all of 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. The list is read-only.

Exceptions

type is null.

Remarks

The comparison is made using Ordinal case in-sensitive on type.

Applies to