Partager via


Méthode WindowsClaimsPrincipal.IsInRole (SecurityIdentifier)

This class interprets IsInRole as the reflection of whether this principal possesses a claim value whose claim type is specified as the RoleClaimType on a contained Identity or a matching group security identifier.

Espace de noms: Microsoft.IdentityModel.Claims
Assembly : Microsoft.IdentityModel (dans microsoft.identitymodel.dll)

Utilisation

    Dim instance As WindowsClaimsPrincipal
Dim sid As SecurityIdentifier
Dim returnValue As Boolean

returnValue = instance.IsInRole(sid)

Syntaxe

'Déclaration
Public Overrides Function IsInRole ( _
    sid As SecurityIdentifier _
) As Boolean
public override bool IsInRole (
    SecurityIdentifier sid
)
public:
virtual bool IsInRole (
    SecurityIdentifier^ sid
) override
public boolean IsInRole (
    SecurityIdentifier sid
)
public override function IsInRole (
    sid : SecurityIdentifier
) : boolean

Paramètres

  • sid
    Security Identifier that should be searched for on the contained identities.

Valeur de retour

True if a claim is possessed by one of the underlying IClaimsIdentity implementations; otherwise, false.

Exceptions

Type d'exception Condition

Cohérence de thread

Tous les membres statiques publics (partagés dans Visual Basic) de ce type sont thread-safe.Il n'est pas garanti que les membres d'instance soient thread-safe.

Plateformes

Plateformes de développement

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

Voir aussi

Référence

Classe WindowsClaimsPrincipal
Membres WindowsClaimsPrincipal
Espace de noms Microsoft.IdentityModel.Claims