StorePermissionAttribute Clase

Definición

Precaución

Code Access Security is not supported or honored by the runtime.

Permite acciones de seguridad de StorePermission para que se apliquen al código mediante seguridad declarativa. Esta clase no puede heredarse.

public ref class StorePermissionAttribute sealed : System::Security::Permissions::CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class StorePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class StorePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public sealed class StorePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type StorePermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StorePermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type StorePermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class StorePermissionAttribute
Inherits CodeAccessSecurityAttribute
Herencia
Atributos

Comentarios

Importante

Ya no se admite código de confianza parcial. Este atributo no tiene ningún efecto en .NET Core.

El ámbito de la declaración que se permite depende del SecurityAction valor que se usa.

La información de seguridad declarada por un atributo de seguridad se almacena en los metadatos del destino del atributo y el sistema accede a ella en tiempo de ejecución. El StorePermissionAttribute atributo solo se usa para la seguridad declarativa. Para la seguridad imperativa, use la StorePermission clase .

Constructores

StorePermissionAttribute(SecurityAction)

Inicializa una nueva instancia de la clase StorePermissionAttribute con la acción de seguridad especificada.

Propiedades

Action

Obtiene o establece una acción de seguridad.

(Heredado de SecurityAttribute)
AddToStore

Obtiene o establece un valor que indica si se le permite al código agregar a un almacén.

CreateStore

Obtiene o establece un valor que indica si se le permite al código crear un almacén.

DeleteStore

Obtiene o establece un valor que indica si se le permite al código eliminar un almacén.

EnumerateCertificates

Obtiene o establece un valor que indica si se le permite al código enumerar los certificados de un almacén.

EnumerateStores

Obtiene o establece un valor que indica si se le permite al código enumerar los almacenes.

Flags

Obtiene o establece los permisos del almacén.

OpenStore

Obtiene o establece un valor que indica si se le permite al código abrir un almacén.

RemoveFromStore

Obtiene o establece un valor que indica si se le permiten al código quitar un certificado de un almacén.

TypeId

Cuando se implementa en una clase derivada, obtiene un identificador único para este Attribute.

(Heredado de Attribute)
Unrestricted

Obtiene o establece un valor que indica si se declara el permiso completo (sin restricciones) al recurso protegido por el atributo.

(Heredado de SecurityAttribute)

Métodos

CreatePermission()

Crea y devuelve un nuevo objeto StorePermission.

Equals(Object)

Devuelve un valor que indica si esta instancia es igual que un objeto especificado.

(Heredado de Attribute)
GetHashCode()

Devuelve el código hash de esta instancia.

(Heredado de Attribute)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
IsDefaultAttribute()

Si se reemplaza en una clase derivada, indica si el valor de esta instancia es el valor predeterminado de la clase derivada.

(Heredado de Attribute)
Match(Object)

Cuando se invalida en una clase derivada, devuelve un valor que indica si esta instancia es igual a un objeto especificado.

(Heredado de Attribute)
MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Implementaciones de interfaz explícitas

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Asigna un conjunto de nombres a un conjunto correspondiente de identificadores de envío.

(Heredado de Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Obtiene la información de tipos de un objeto, que puede utilizarse para obtener la información de tipos de una interfaz.

(Heredado de Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Recupera el número de interfaces de información de tipo que proporciona un objeto (0 ó 1).

(Heredado de Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Proporciona acceso a las propiedades y los métodos expuestos por un objeto.

(Heredado de Attribute)

Se aplica a

Consulte también