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.
命名空间: Microsoft.IdentityModel.Claims
程序集: Microsoft.IdentityModel(microsoft.identitymodel.dll 中)
用法
Dim instance As WindowsClaimsPrincipal Dim role As String Dim returnValue As Boolean returnValue = instance.IsInRole(role)
语法
声明
Public Overrides Function IsInRole ( _
    role As String _
) As Boolean
public override bool IsInRole (
    string role
)
public:
virtual bool IsInRole (
    String^ role
) override
public boolean IsInRole (
    String role
)
public override function IsInRole (
    role : String
) : boolean
参数
- role
The claim value of the role to check for. 
返回值
Returns Boolean. true if the role exists as a Windows group or as a value on a role claim type; otherwise, false.
线程安全
此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不能保证任何实例成员是线程安全的。
平台
开发平台
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
请参见
参考
WindowsClaimsPrincipal 类
WindowsClaimsPrincipal 成员
Microsoft.IdentityModel.Claims 命名空间