Méthode ClaimsPrincipal.CreateFromPrincipal (IPrincipal, String)
Creates the appropriate implementation of an IClaimsPrincipal based on the type of the specified IIdentity (e.g. WindowsClaimsPrincipal for a WindowsIdentity). Note the appropriate IClaimsIdentity is generated based on the specified IIdentity as well.
Espace de noms: Microsoft.IdentityModel.Claims
Assembly : Microsoft.IdentityModel (dans microsoft.identitymodel.dll)
Utilisation
Dim principal As IPrincipal Dim windowsIssuerName As String Dim returnValue As IClaimsPrincipal returnValue = ClaimsPrincipal.CreateFromPrincipal(principal, windowsIssuerName)
Syntaxe
'Déclaration
Public Shared Function CreateFromPrincipal ( _
principal As IPrincipal, _
windowsIssuerName As String _
) As IClaimsPrincipal
public static IClaimsPrincipal CreateFromPrincipal (
IPrincipal principal,
string windowsIssuerName
)
public:
static IClaimsPrincipal^ CreateFromPrincipal (
IPrincipal^ principal,
String^ windowsIssuerName
)
public static IClaimsPrincipal CreateFromPrincipal (
IPrincipal principal,
String windowsIssuerName
)
public static function CreateFromPrincipal (
principal : IPrincipal,
windowsIssuerName : String
) : IClaimsPrincipal
Paramètres
- principal
An implementation of IPrincipal.
- windowsIssuerName
The issuer name to use for Windows claims.
Valeur de retour
A claims-based principal.
Exceptions
Type d'exception | Condition |
---|
Cohérence de thread
Tous les membres statiques publics (partagés dans Visual Basic) de ce type sont thread-safe.Il n'est pas garanti que les membres d'instance soient thread-safe.
Plateformes
Plateformes de développement
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Voir aussi
Référence
Classe ClaimsPrincipal
Membres ClaimsPrincipal
Espace de noms Microsoft.IdentityModel.Claims