ClaimSet.FindClaims(String, String) Metoda

Definice

Při přepsání v odvozené třídě vyhledá Claim objekt, který odpovídá zadanému typu deklarace identity a právům v objektu ClaimSet.

public:
 abstract System::Collections::Generic::IEnumerable<System::IdentityModel::Claims::Claim ^> ^ FindClaims(System::String ^ claimType, System::String ^ right);
public abstract System.Collections.Generic.IEnumerable<System.IdentityModel.Claims.Claim> FindClaims (string claimType, string right);
abstract member FindClaims : string * string -> seq<System.IdentityModel.Claims.Claim>
Public MustOverride Function FindClaims (claimType As String, right As String) As IEnumerable(Of Claim)

Parametry

claimType
String

Identifikátor URI (Uniform Resource Identifier) typu deklarace identity. Jako statické vlastnosti třídy je k dispozici několik typů deklarací ClaimTypes identity.

right
String

Identifikátor URI práva přidruženého k nové deklaraci identity. Jako statické vlastnosti Rights třídy je k dispozici několik práv.

Návraty

Typ Claim AIEnumerable<T>, který umožňuje vytvořit výčet deklarací identity, které odpovídají zadaným kritériím.

Příklady

// Iterate through claims of type "http://example.org/claims/allowedoperation".
foreach (Claim c in cs.FindClaims("http://example.org/claims/allowedoperation",
    Rights.PossessProperty))
{
For Each c In cs.FindClaims("http://example.org/claims/allowedoperation", Rights.PossessProperty)

Poznámky

Pokud chcete zjistit, jestli tato ClaimSet deklarace obsahuje deklaraci identity bez vrácení deklarace identity, zavolejte metodu ContainsClaim .

Platí pro