Share via


SecurityCriticalAttribute Třída

Definice

Určuje, že kód nebo sestavení provádí operace důležité pro zabezpečení.

public ref class SecurityCriticalAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
public sealed class SecurityCriticalAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
public sealed class SecurityCriticalAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
type SecurityCriticalAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
type SecurityCriticalAttribute = class
    inherit Attribute
Public NotInheritable Class SecurityCriticalAttribute
Inherits Attribute
Dědičnost
SecurityCriticalAttribute
Atributy

Poznámky

Důležité

Částečně důvěryhodný kód se už nepodporuje. Tento atribut nemá v .NET Core žádný vliv.

Operace důležité pro zabezpečení jsou akce, které ovlivňují zabezpečení přístupu kódu, například zvýšení oprávnění prostřednictvím potlačení kontrol zabezpečení přístupu kódu pomocí Assert metody, volání nebezpečného spravovaného kódu atd. SecurityCriticalAttribute Atribut nebo SecuritySafeCriticalAttribute atribut musí být použity na kód, aby kód prováděl operace důležité pro zabezpečení.

Poznámka

Hodnota SecurityCriticalAttribute je ekvivalentem požadavku propojení pro plný vztah důvěryhodnosti. Typ nebo člen označený znakem SecurityCriticalAttribute může být volán pouze plně důvěryhodným kódem; nemusí volat konkrétní oprávnění. Nelze ji volat částečně důvěryhodným kódem.

Použití SecurityCriticalAttribute na úrovni sestavení identifikuje sestavení jako sestavení důležité pro zabezpečení. Celé sestavení lze identifikovat jako kritické nastavením parametru SecurityCriticalScope.Everythingoboru .

Konstruktory

SecurityCriticalAttribute()

Inicializuje novou instanci SecurityCriticalAttribute třídy.

SecurityCriticalAttribute(SecurityCriticalScope)

Inicializuje novou instanci SecurityCriticalAttribute třídy se zadaným oborem.

Vlastnosti

Scope
Zastaralé.

Získá obor atributu.

TypeId

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

(Zděděno od Attribute)

Metody

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

Získá aktuální Type instanci.

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

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)

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ří mělkou kopii aktuálního Objectsouboru .

(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 pro 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é