SecurityManager.IsGranted(IPermission) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Varning
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.
Avgör om en behörighet beviljas anroparen.
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);
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
Parametrar
- perm
- IPermission
Behörighet att testa mot uppringarens beviljande.
Returer
trueom behörigheterna som beviljats anroparen innehåller behörigheten perm, annars . false
- Attribut
Kommentarer
Beviljande av behörigheter bestäms av en princip och skiljer sig från ett krav som omfattas av åsidosättningar, till exempel en kontroll. IsGranted Testar också endast beviljandet av den anropande kodsammansättningen, oberoende av andra anropare i stacken.