RegistryPermissionAttribute Třída

Definice

Upozornění

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

Umožňuje použít akce zabezpečení pro RegistryPermission kód pomocí deklarativního zabezpečení. Tuto třídu nelze zdědit.

public ref class RegistryPermissionAttribute 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 RegistryPermissionAttribute : 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 RegistryPermissionAttribute : 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 RegistryPermissionAttribute : 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]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class RegistryPermissionAttribute : 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 RegistryPermissionAttribute = 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 RegistryPermissionAttribute = 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 RegistryPermissionAttribute = 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>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RegistryPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class RegistryPermissionAttribute
Inherits CodeAccessSecurityAttribute
Dědičnost
Atributy

Poznámky

Upozornění

Zabezpečení přístupu k kódu (CAS) je zastaralé ve všech verzích rozhraní .NET Framework a .NET. Nedávné verze rozhraní .NET nedotknou poznámek CAS a v případě použití rozhraní API souvisejících s CAS se nevygenerují chyby. Vývojáři by měli hledat alternativní způsoby provádění úloh zabezpečení.

Rozsah povolené deklarace závisí na SecurityAction použité deklaraci.

Informace o zabezpečení deklarované atributem zabezpečení jsou uloženy v metadatech cíle atributu a jsou přístupné systémem za běhu. Atributy zabezpečení se používají pouze pro deklarativní zabezpečení. Pro imperativní zabezpečení použijte odpovídající třídu oprávnění.

Konstruktory

RegistryPermissionAttribute(SecurityAction)

Inicializuje novou instanci RegistryPermissionAttribute třídy se zadaným SecurityAction.

Vlastnosti

Action

Získá nebo nastaví akci zabezpečení.

(Zděděno od SecurityAttribute)
All
Zastaralé.
Zastaralé.
Zastaralé.
Zastaralé.

Získá nebo nastaví úplný přístup pro zadané klíče registru.

ChangeAccessControl

Získá nebo nastaví změnit řízení přístupu pro zadané klíče registru.

Create

Získá nebo nastaví přístup na úrovni vytvoření pro zadané klíče registru.

Read

Získá nebo nastaví přístup pro čtení pro zadané klíče registru.

TypeId

Při implementaci v odvozené třídě získá jedinečný identifikátor pro tento Attribute.

(Zděděno od Attribute)
Unrestricted

Získá nebo nastaví hodnotu určující, zda je deklarováno úplné (neomezené) oprávnění k prostředku chráněnému atributem.

(Zděděno od SecurityAttribute)
ViewAccessControl

Získá nebo nastaví zobrazení řízení přístupu pro zadané klíče registru.

ViewAndModify

Získá nebo nastaví zadanou sadu klíčů registru, které lze zobrazit a upravit.

Write

Získá nebo nastaví přístup k zápisu pro zadané klíče registru.

Metody

CreatePermission()

Vytvoří a vrátí novou RegistryPermission.

Equals(Object)

Vrací hodnotu, která určuje, zda je tato instance rovna zadanému objektu.

(Zděděno od Attribute)
GetHashCode()

Vrátí hodnotu hash pro tuto instanci.

(Zděděno od Attribute)
GetType()

Type Získá aktuální instanci.

(Zděděno od Object)
IsDefaultAttribute()

Při přepsání v odvozené třídě určuje, zda hodnota této instance je výchozí hodnotou odvozené třídy.

(Zděděno od Attribute)
Match(Object)

Při přepsání v odvozené třídě vrátí hodnotu, která označuje, zda se tato instance rovná zadanému objektu.

(Zděděno od Attribute)
MemberwiseClone()

Vytvoří použádnou kopii aktuálního souboru Object.

(Zděděno od Object)
ToString()

Vrátí řetězec, který představuje aktuální objekt.

(Zděděno od Object)

Explicitní implementace rozhraní

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

Mapuje sadu názvů na odpovídající sadu identifikátorů pro rozesílání.

(Zděděno od Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Načte informace o typu objektu, který lze použít k získání informací o typu rozhraní.

(Zděděno od Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Získá počet rozhraní typu informací, které objekt poskytuje (0 nebo 1).

(Zděděno od Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Poskytuje přístup k vlastnostem a metodám vystaveným objektem.

(Zděděno od Attribute)

Platí pro

Viz také