SecurityAttribute Osztály

Definíció

Figyelemfelhívás

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

Megadja a deklaratív biztonság alapattribútumosztályát, amelyből CodeAccessSecurityAttribute származik.

public ref class SecurityAttribute abstract : Attribute
[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 abstract class SecurityAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public abstract class SecurityAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public abstract class SecurityAttribute : Attribute
[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 abstract class SecurityAttribute : Attribute
[<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 SecurityAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type SecurityAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type SecurityAttribute = class
    inherit Attribute
[<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 SecurityAttribute = class
    inherit Attribute
Public MustInherit Class SecurityAttribute
Inherits Attribute
Öröklődés
SecurityAttribute
Származtatott
Attribútumok

Megjegyzések

Figyelmeztetés

A Code Access Security (CAS) elavult a .NET-keretrendszer és a .NET összes verziójában. A .NET legújabb verziói nem tartják tiszteletben a CAS-megjegyzéseket, és cas-okkal kapcsolatos API-k használata esetén hibákat okoznak. A fejlesztőknek alternatív módot kell keresnie a biztonsági feladatok elvégzésére.

Megjegyzések az implementálókhoz

Ha örököl, SecurityAttributefelül kell bírálnia CreatePermission().

Konstruktorok

Name Description
SecurityAttribute(SecurityAction)
Elavult.

Inicializálja a megadott SecurityAttributepéldány új példányátSecurityAction.

Tulajdonságok

Name Description
Action
Elavult.

Biztonsági műveletet hajt végre vagy állít be.

TypeId
Elavult.

Ha származtatott osztályban implementálják, ehhez egy egyedi azonosítót Attributekap.

(Öröklődés forrása Attribute)
Unrestricted
Elavult.

Lekéri vagy beállít egy értéket, amely jelzi, hogy az attribútum által védett erőforrás teljes (korlátlan) engedélye deklarálva van-e.

Metódusok

Name Description
CreatePermission()
Elavult.

Ha egy származtatott osztályban felül van bírálva, létrehoz egy engedélyobjektumot, amely aztán bináris formában szerializálható, és tartósan tárolható a SecurityAction szerelvény metaadataival együtt.

Equals(Object)
Elavult.

Olyan értéket ad vissza, amely jelzi, hogy ez a példány egyenlő-e egy adott objektummal.

(Öröklődés forrása Attribute)
GetHashCode()
Elavult.

A példány kivonatkódját adja vissza.

(Öröklődés forrása Attribute)
GetType()
Elavult.

Lekéri az Type aktuális példányt.

(Öröklődés forrása Object)
IsDefaultAttribute()
Elavult.

Ha egy származtatott osztályban felül van bírálva, azt jelzi, hogy a példány értéke-e a származtatott osztály alapértelmezett értéke.

(Öröklődés forrása Attribute)
Match(Object)
Elavult.

Származtatott osztály felülírásakor egy olyan értéket ad vissza, amely jelzi, hogy ez a példány egy adott objektummal egyenlő-e.

(Öröklődés forrása Attribute)
MemberwiseClone()
Elavult.

Az aktuális Objectpéldány sekély másolatát hozza létre.

(Öröklődés forrása Object)
ToString()
Elavult.

Az aktuális objektumot jelképező sztringet ad vissza.

(Öröklődés forrása Object)

Explicit interfész-implementációk

Name Description
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
Elavult.

Névkészletet képez le a küldési azonosítók megfelelő készletére.

(Öröklődés forrása Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
Elavult.

Lekéri egy objektum típusadatait, amelyek a felület típusadatainak lekérésére használhatók.

(Öröklődés forrása Attribute)
_Attribute.GetTypeInfoCount(UInt32)
Elavult.

Lekéri az objektumok által biztosított típusinformációs felületek számát (0 vagy 1).

(Öröklődés forrása Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
Elavult.

Hozzáférést biztosít az objektumok által közzétett tulajdonságokhoz és metódusokhoz.

(Öröklődés forrása Attribute)

A következőre érvényes:

Lásd még