WindowsClaimsPrincipal.IsInRole Метод (String)
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.
Безопасность потоков
Любые открытые статические члены (Shared в Visual Basic) этого типа являются поточно-ориентированными.Любые члены экземпляров не являются гарантированно поточно-ориентированными.
Платформы
Платформа разработки
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
См. также
Справочник
Класс WindowsClaimsPrincipal
WindowsClaimsPrincipal Члены
Пространство имен Microsoft.IdentityModel.Claims