PublisherIdentityPermissionAttribute Třída

Definice

Upozornění

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

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

public ref class PublisherIdentityPermissionAttribute 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 PublisherIdentityPermissionAttribute : 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 PublisherIdentityPermissionAttribute : 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 PublisherIdentityPermissionAttribute : 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 PublisherIdentityPermissionAttribute : 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 PublisherIdentityPermissionAttribute = 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 PublisherIdentityPermissionAttribute = 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 PublisherIdentityPermissionAttribute = 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 PublisherIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class PublisherIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
Dědičnost
PublisherIdentityPermissionAttribute
Atributy

Poznámky

Upozornění

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

Rozsah deklarace, která je povolena, závisí na použitém rozsahu SecurityAction .

Vlastnosti CertFile, SignedFilea X509Certificate se vzájemně vylučují.

Informace o zabezpečení deklarované atributem zabezpečení jsou uloženy v metadatech cíle atributu a systém k tomu přistupuje 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í.

Důležité

Počínaje rozhraním .NET Framework 4 se nepoužívají oprávnění identit.

V rozhraní .NET Framework verze 1.0 a 1.1 nesmí mít Unrestricted oprávnění identity hodnotu stavu oprávnění. Počínaje rozhraním .NET Framework verze 2.0 můžou mít oprávnění identity libovolnou hodnotu stavu oprávnění. To znamená, že ve verzi 2.0 a novějších mají oprávnění identit stejné chování jako oprávnění, která implementují IUnrestrictedPermission rozhraní.

Poznámka

Zabezpečení přístupu kódu ve výchozím nastavení nekontroluje Publisher důkazy. Pokud váš počítač nemá vlastní skupinu kódu založenou PublisherMembershipCondition na třídě, můžete zvýšit výkon obejitím ověření podpisu Authenticode. Toho se dosahuje konfigurací modulu runtime tak, aby neposkytoval Publisher důkazy o zabezpečení přístupu kódu. Další informace o konfiguraci této možnosti a o tom, které aplikace ji můžou používat, najdete v elementu <generatePublisherEvidence> .

Konstruktory

PublisherIdentityPermissionAttribute(SecurityAction)
Zastaralé.

Inicializuje novou instanci PublisherIdentityPermissionAttribute třídy se zadaným SecurityActionobjektem .

Vlastnosti

Action
Zastaralé.

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

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

Získá nebo nastaví certifikační soubor obsahující certifikát Authenticode X.509v3.

SignedFile
Zastaralé.

Získá nebo nastaví podepsaný soubor, ze kterého chcete extrahovat certifikát Authenticode X.509v3.

TypeId
Zastaralé.

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

(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ého atributem.

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

Získá nebo nastaví Authenticode X.509v3 certifikát, který identifikuje vydavatele volajícího kódu.

Metody

CreatePermission()
Zastaralé.

Vytvoří a vrátí novou instanci objektu PublisherIdentityPermission.

Equals(Object)
Zastaralé.

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

(Zděděno od Attribute)
GetHashCode()
Zastaralé.

Vrátí hodnotu hash pro tuto instanci.

(Zděděno od Attribute)
GetType()
Zastaralé.

Získá aktuální Type instanci.

(Zděděno od Object)
IsDefaultAttribute()
Zastaralé.

Při přepsání v odvozené třídě označuje, zda je hodnota této instance 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á označuje, zda se tato instance rovná zadanému objektu.

(Zděděno od Attribute)
MemberwiseClone()
Zastaralé.

Vytvoří mělkou kopii aktuálního Objectsouboru .

(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í

_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)

Platí pro

Viz také