DynamicallyAccessedMembersAttribute Classe

Definizione

Indica che alcuni membri di un Type specificato sono accessibili in modo dinamico, ad esempio tramite 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
Ereditarietà
DynamicallyAccessedMembersAttribute
Attributi

Commenti

Questo attributo consente agli strumenti di comprendere i membri a cui si accede durante l'esecuzione di un programma. Questo attributo è valido per i membri il cui tipo è Type o String. Quando questo attributo viene applicato a una posizione di tipo String, il presupposto è che la stringa rappresenta un nome di tipo completo. Se l'attributo viene applicato a un metodo, viene considerato come un caso speciale e implica che l'attributo deve essere applicato al parametro "this" del metodo. L'attributo deve essere usato solo nei metodi di istanza di tipi che sono assegnabili a Type (o string, ma non verrà usato da alcun metodo). Per ulteriori informazioni, vedere Introduzione agli avvisi di ritaglio.

Costruttori

Nome Descrizione
DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes)

Inizializza una nuova istanza della DynamicallyAccessedMembersAttribute classe con i tipi di membro specificati.

Proprietà

Nome Descrizione
MemberTypes

Ottiene l'oggetto DynamicallyAccessedMemberTypes che specifica il tipo di membri a cui si accede in modo dinamico.

TypeId

Se implementato in una classe derivata, ottiene un identificatore univoco per questo Attribute.

(Ereditato da Attribute)

Metodi

Nome Descrizione
Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
GetHashCode()

Restituisce il codice hash per questa istanza.

(Ereditato da Attribute)
GetType()

Ottiene il Type dell'istanza corrente.

(Ereditato da Object)
IsDefaultAttribute()

Quando sottoposto a override in una classe derivata, indica se il valore di questa istanza è il valore predefinito per la classe derivata.

(Ereditato da Attribute)
Match(Object)

Quando sottoposto a override in una classe derivata, restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
MemberwiseClone()

Crea una copia superficiale del Objectcorrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a

Vedi anche