DynamicallyAccessedMembersAttribute Třída

Definice

Označuje, že k určitým členům v zadaném Type se přistupuje dynamicky, například prostřednictvím System.Reflection.

public ref class DynamicallyAccessedMembersAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)]
public sealed class DynamicallyAccessedMembersAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.GenericParameter | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)>]
type DynamicallyAccessedMembersAttribute = class
    inherit Attribute
Public NotInheritable Class DynamicallyAccessedMembersAttribute
Inherits Attribute
Dědičnost
DynamicallyAccessedMembersAttribute
Atributy

Poznámky

Tento atribut umožňuje nástrojům pochopit, ke kterým členům se přistupuje během provádění programu. Tento atribut je platný pro členy, jejichž typ je Type nebo String. Pokud se tento atribut použije na umístění typu String, předpokládá se, že řetězec představuje plně kvalifikovaný název typu. Pokud se atribut použije na metodu, považuje se za speciální případ a znamená to, že atribut by se měl použít na parametr "this" metody. Atribut by měl být použit pouze u metod instancí typů, které lze přiřadit Type (nebo string, ale žádné metody jej tam nebudou používat). Další informace naleznete v části Úvod do výstrah o ořezávání.

Konstruktory

Name Description
DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes)

Inicializuje novou instanci DynamicallyAccessedMembersAttribute třídy se zadanými typy členů.

Vlastnosti

Name Description
MemberTypes

DynamicallyAccessedMemberTypes Získá ten, který určuje typ dynamicky přístupných členů.

TypeId

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

(Zděděno od Attribute)

Metody

Name Description
Equals(Object)

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

(Zděděno od Attribute)
GetHashCode()

Vrátí kód hash pro tuto instanci.

(Zděděno od Attribute)
GetType()

Získá Type aktuální instance.

(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 pro odvozenou třídu.

(Zděděno od Attribute)
Match(Object)

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

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

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

Vrátí řetězec, který představuje aktuální objekt.

(Zděděno od Object)

Platí pro

Viz také