SecurityManager.IsGranted(IPermission) Método

Definição

Cuidado

Esta API agora é obsoleta.

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.Determines whether a permission is granted to the caller.

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

Parâmetros

perm
IPermission

A permissão a ser testada na concessão do chamador.The permission to test against the grant of the caller.

Retornos

Boolean

true se as permissões concedidas ao chamador incluírem a permissão perm; caso contrário, false.true if the permissions granted to the caller include the permission perm; otherwise, false.

Atributos

Comentários

A concessão de permissões é determinada pela política e é diferente de uma entidade de demanda para substituições, como uma declaração.Granting of permissions is determined by policy and is different from a demand subject to overrides, such as an assert. Além disso, IsGranted o só testa a concessão do assembly de código de chamada, independentemente de outros chamadores na pilha.Also, IsGranted only tests the grant of the calling code assembly, independent of other callers on the stack.

Aplica-se a