SecurityManager.IsGranted(IPermission) Método

Definição

Cuidado

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.

Determina se uma permissão é concedida ao chamador.

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

Parâmetros

perm
IPermission

A permissão para testar a concessão do chamador.

Retornos

true se as permissões concedidas ao chamador incluirem a permissão perm; caso contrário, false.

Atributos

Comentários

A concessão de permissões é determinada pela política e é diferente de uma demanda sujeita a substituições, como uma declaração. Além disso, IsGranted testa apenas a concessão do assembly de código de chamada, independentemente de outros chamadores na pilha.

Aplica-se a