Udostępnij za pośrednictwem


SecurityManager.IsGranted(IPermission) Metoda

Definicja

Przestroga

Ten interfejs API jest już przestarzały.

Przestroga

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.

Określa, czy do wywołującego udzielono uprawnień.

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

Parametry

perm
IPermission

Uprawnienie do testowania pod kątem udzielenia obiektu wywołującego.

Zwraca

true jeśli uprawnienia przyznane obiektowi wywołującego obejmują uprawnienie perm; w przeciwnym razie false.

Atrybuty

Uwagi

Udzielanie uprawnień jest określane przez zasady i różni się od żądania objętego przesłonięciami, takimi jak potwierdzenie. IsGranted Ponadto tylko testuje przyznanie zestawu kodu wywołującego, niezależnie od innych elementów wywołujących na stosie.

Dotyczy