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.
命名空间: Microsoft.IdentityModel.Claims
程序集: Microsoft.IdentityModel(microsoft.identitymodel.dll 中)
用法
Dim instance As WindowsClaimsPrincipal Dim sid As SecurityIdentifier Dim returnValue As Boolean returnValue = instance.IsInRole(sid)
语法
声明
Public Overrides Function IsInRole ( _
sid As SecurityIdentifier _
) As Boolean
public override bool IsInRole (
SecurityIdentifier sid
)
public:
virtual bool IsInRole (
SecurityIdentifier^ sid
) override
public boolean IsInRole (
SecurityIdentifier sid
)
public override function IsInRole (
sid : SecurityIdentifier
) : boolean
参数
- sid
Security Identifier that should be searched for on the contained identities.
返回值
True if a claim is possessed by one of the underlying IClaimsIdentity implementations; 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 命名空间