ClaimsPrincipal.IsInRole メソッド

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.

名前空間: Microsoft.IdentityModel.Claims
アセンブリ: Microsoft.IdentityModel (microsoft.identitymodel.dll 中)

使用方法

    Dim instance As ClaimsPrincipal
Dim role As String
Dim returnValue As Boolean

returnValue = instance.IsInRole(role)

構文

'宣言
Public Function IsInRole ( _
    role As String _
) As Boolean
public bool IsInRole (
    string role
)
public:
virtual bool IsInRole (
    String^ role
) sealed
public final boolean IsInRole (
    String role
)
public final function IsInRole (
    role : String
) : boolean

パラメーター

  • role
    The claim type of the role to check for.

戻り値

Returns Boolean. true if a claim with the specified type exists; otherwise, false.

スレッド セーフ

この型のパブリックな静的 (Visual Basic では共有) メンバーは、すべてスレッド セーフです。インスタンス メンバーはすべて、スレッド セーフであることが保証されません。

プラットフォーム

開発プラットフォーム

Windows Server 2003, Windows Vista

Target Platforms

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

関連項目

参照

ClaimsPrincipal クラス
ClaimsPrincipal メンバー
Microsoft.IdentityModel.Claims 名前空間