SecurityManager.IsGranted(IPermission) Método

Definição

Atenção

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 a 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 contra a concessão do chamador.

Devoluções

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

Atributos

Observações

A concessão de permissões é determinada pela política e é diferente de uma exigência sujeita a sobrescrições, como uma assert. Além disso, IsGranted só testa a concessão do assembly do código de chamada, independentemente dos outros chamadores na pilha.

Aplica-se a