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.
Namespace: Microsoft.IdentityModel.Claims
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

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

returnValue = instance.IsInRole(sid)

Syntax

Visual Basic
Public Overrides Function IsInRole ( _
		sid As SecurityIdentifier _
) As Boolean
C#
public override bool IsInRole (
		SecurityIdentifier sid
)
C++
public:
virtual bool IsInRole (
		SecurityIdentifier^ sid
) override
J#
public boolean IsInRole (
		SecurityIdentifier sid
)
JScript
public override function IsInRole (
		sid : SecurityIdentifier
) : boolean

Parameters

sid

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

Return Value

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

Exceptions

Exception type Condition

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

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

See Also