SecurityManager.IsGranted(IPermission) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Attention
Cette API est à présent déconseillée.
Attention
IsGranted is obsolete and will be removed in a future release of the .NET Framework. Please use the PermissionSet property of either AppDomain or Assembly instead.
Détermine si une autorisation est accordée à l'appelant.
public:
static bool IsGranted(System::Security::IPermission ^ perm);
[System.Obsolete]
public static bool IsGranted (System.Security.IPermission perm);
public static bool IsGranted (System.Security.IPermission perm);
[System.Obsolete("IsGranted is obsolete and will be removed in a future release of the .NET Framework. Please use the PermissionSet property of either AppDomain or Assembly instead.")]
public static bool IsGranted (System.Security.IPermission perm);
[<System.Obsolete>]
static member IsGranted : System.Security.IPermission -> bool
static member IsGranted : System.Security.IPermission -> bool
[<System.Obsolete("IsGranted is obsolete and will be removed in a future release of the .NET Framework. Please use the PermissionSet property of either AppDomain or Assembly instead.")>]
static member IsGranted : System.Security.IPermission -> bool
Public Shared Function IsGranted (perm As IPermission) As Boolean
Paramètres
- perm
- IPermission
Autorisation à tester par rapport aux autorisations attribuées à l'appelant.
Retours
true
si les autorisations accordées à l'appelant comprennent l'autorisation perm
; sinon false
.
- Attributs
Remarques
L’octroi d’autorisations est déterminé par la stratégie et est différent d’une demande soumise à des substitutions, telles qu’une assertion. En outre, IsGranted teste uniquement l’octroi de l’assembly de code appelant, indépendamment des autres appelants sur la pile.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour