This class interprets IsInRole as the
reflection of whether this principal possesses a claim specified by
a configured list. The claim value has no bearing on the
result.
Namespace: Microsoft.IdentityModel.Claims
Assembly: Microsoft.IdentityModel (in
microsoft.identitymodel.dll)
Usage
Visual Basic |
Dim instance As ClaimsPrincipal
Dim role As String
Dim returnValue As Boolean
returnValue = instance.IsInRole(role)
|
Syntax
Visual Basic |
Public Function IsInRole ( _
role As String _
) As Boolean
|
C# |
public bool IsInRole (
string role
)
|
C++ |
public:
virtual bool IsInRole (
String^ role
) sealed
|
J# |
public final boolean IsInRole (
String role
)
|
JScript |
public final function IsInRole (
role : String
) : boolean
|
Parameters
- role
-
The claim type of the role to check for.
Return Value
Returns
Boolean.
true if a claim with the specified
type exists; 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