Язык

SecurityManager.IsGranted(IPermission) Метод

Определение

Внимание!

Теперь этот API является нерекомендуемым.

Внимание!

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]
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

Параметры

perm
IPermission

Разрешение на тестирование для предоставления вызывающего объекта.

Возвращаемое значение

trueЗначение , permесли разрешения, предоставленные вызывающему объекту, включают разрешениеfalse; в противном случае .

Атрибуты

Комментарии

Предоставление разрешений определяется политикой и отличается от переопределений спроса, таких как утверждение. Кроме того, IsGranted тестирует только предоставление вызывающей сборки кода, независимо от других вызывающих объектов в стеке.

Применяется к