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.

适用于