ClaimsIdentity.FindAll 方法

定義

擷取所有符合指定之條件的宣告。Retrieves all of the claims that match a specified condition.

多載

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>)

擷取符合指定述詞的所有宣告。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)

參數

match
Predicate<Claim>

執行比對邏輯的函式。The function that performs the matching logic.

傳回

IEnumerable<Claim>

相符的宣告。The matching claims. 清單是唯讀的。The list is read-only.

例外狀況

matchnullmatch is null.

適用於

FindAll(String)

擷取具有指定宣告型別的所有宣告。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)

參數

type
String

要比對宣告的宣告類型。The claim type against which to match claims.

傳回

IEnumerable<Claim>

相符的宣告。The matching claims. 清單是唯讀的。The list is read-only.

例外狀況

typenulltype is null.

備註

比較是使用中的序數區分大小寫來進行 typeThe comparison is made using Ordinal case in-sensitive on type.

適用於