This class interprets IsInRole as the reflection of whether this principal possesses a claim value whose claim type is in a configured list 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 role As String
Dim returnValue As Boolean

returnValue = instance.IsInRole(role)

Syntax

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

Parameters

role

The claim value of the role to check for.

Return Value

Returns Boolean. true if the role exists as a Windows group or as a value on a role claim type; otherwise, false.

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