SecurityCriticalAttribute Třída

Definice

Určuje, že kód nebo sestavení provádí operace kritické 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á žádný vliv na .NET Core.

Důležité operace zabezpečení jsou akce, které mají vliv na zabezpečení přístupu k kódu, jako je zvýšení oprávnění prostřednictvím potlačení kontrol zabezpečení přístupu k kódu pomocí Assert metody, volání nebezpečného spravovaného kódu atd. Atribut SecurityCriticalAttribute nebo SecuritySafeCriticalAttribute atribut se musí použít pro kód kódu pro provádění operací kritických pro zabezpečení.

Poznámka

Jedná se SecurityCriticalAttribute o ekvivalent požadavku na propojení pro plný vztah důvěryhodnosti. Typ nebo člen označený značkou SecurityCriticalAttribute lze volat pouze plně důvěryhodným kódem. Nemusí volat konkrétní oprávnění. Nelze ho volat částečně důvěryhodným kódem.

Použití SecurityCriticalAttribute na úrovni sestavení identifikuje sestavení jako sestavení kritické 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 tento Attribute.

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

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é