EnvironmentPermissionAttribute Třída
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Upozornění
Code Access Security is not supported or honored by the runtime.
Umožňuje použití akcí EnvironmentPermission zabezpečení na kód pomocí deklarativního zabezpečení. Tato třída se nemůže dědit.
public ref class EnvironmentPermissionAttribute 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)]
[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 EnvironmentPermissionAttribute : 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 EnvironmentPermissionAttribute : 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 EnvironmentPermissionAttribute : 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 EnvironmentPermissionAttribute : 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}")>]
type EnvironmentPermissionAttribute = 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 EnvironmentPermissionAttribute = 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 EnvironmentPermissionAttribute = class
inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type EnvironmentPermissionAttribute = class
inherit CodeAccessSecurityAttribute
Public NotInheritable Class EnvironmentPermissionAttribute
Inherits CodeAccessSecurityAttribute
- Dědičnost
- Atributy
Poznámky
Caution
Zabezpečení přístupu kódu (CAS) je zastaralé ve všech verzích rozhraní .NET Framework a .NET. Nedávné verze .NET nezohledňují anotace CAS a způsobují chyby, pokud se používají API související s CAS. 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í.
Názvy proměnných prostředí nerozlišují malá a velká písmena. Více názvů proměnných prostředí je určeno oddělením názvů pomocí PathSeparator.
Konstruktory
| Name | Description |
|---|---|
| EnvironmentPermissionAttribute(SecurityAction) |
Zastaralé.
Inicializuje novou instanci EnvironmentPermissionAttribute třídy se zadaným SecurityAction. |
Vlastnosti
| Name | Description |
|---|---|
| Action |
Zastaralé.
Získá nebo nastaví akci zabezpečení. (Zděděno od SecurityAttribute) |
| All |
Zastaralé.
Nastaví úplný přístup pro proměnné prostředí určené řetězcovou hodnotou. |
| Read |
Zastaralé.
Získá nebo nastaví přístup pro čtení pro proměnné prostředí určené řetězcovou hodnotou. |
| TypeId |
Zastaralé.
Při implementaci v odvozené třídě získá jedinečný identifikátor pro tento Attribute. (Zděděno od Attribute) |
| Unrestricted |
Zastaralé.
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) |
| Write |
Zastaralé.
Získá nebo nastaví přístup k zápisu pro proměnné prostředí určené řetězcovou hodnotou. |
Metody
| Name | Description |
|---|---|
| CreatePermission() |
Zastaralé.
Vytvoří a vrátí novou EnvironmentPermission. |
| Equals(Object) |
Zastaralé.
Vrátí hodnotu, která určuje, zda je tato instance rovna zadanému objektu. (Zděděno od Attribute) |
| GetHashCode() |
Zastaralé.
Vrátí kód hash pro tuto instanci. (Zděděno od Attribute) |
| GetType() |
Zastaralé.
Získá Type aktuální instance. (Zděděno od Object) |
| IsDefaultAttribute() |
Zastaralé.
Při přepsání v odvozené třídě určuje, zda hodnota této instance je výchozí hodnotou pro odvozenou třídu. (Zděděno od Attribute) |
| Match(Object) |
Zastaralé.
Při přepsání v odvozené třídě vrátí hodnotu, která určuje, zda se tato instance rovná zadanému objektu. (Zděděno od Attribute) |
| MemberwiseClone() |
Zastaralé.
Vytvoří mělkou kopii aktuálního Object. (Zděděno od Object) |
| ToString() |
Zastaralé.
Vrátí řetězec, který představuje aktuální objekt. (Zděděno od Object) |
Explicitní implementace rozhraní
| Name | Description |
|---|---|
| _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
Zastaralé.
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) |
Zastaralé.
Načte informace o typu objektu, který lze použít k získání informací o typu pro rozhraní. (Zděděno od Attribute) |
| _Attribute.GetTypeInfoCount(UInt32) |
Zastaralé.
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) |
Zastaralé.
Poskytuje přístup k vlastnostem a metodám vystaveným objektem. (Zděděno od Attribute) |