ParameterInfo.GetCustomAttributesData Metodo

Definizione

Restituisce un elenco di oggetti CustomAttributeData per il parametro corrente, che possono essere utilizzati nel contesto ReflectionOnly.

public:
 virtual System::Collections::Generic::IList<System::Reflection::CustomAttributeData ^> ^ GetCustomAttributesData();
public virtual System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData ();
abstract member GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
override this.GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
Public Overridable Function GetCustomAttributesData () As IList(Of CustomAttributeData)

Restituisce

Elenco generico di oggetti CustomAttributeData che rappresentano i dati relativi agli attributi applicati al parametro corrente.

Commenti

Utilizzare questo metodo per esaminare gli attributi personalizzati del codice nel contesto di sola reflection, nei casi in cui gli attributi personalizzati stessi vengono definiti nel codice caricato nel contesto di sola reflection. I metodi come Attribute.GetCustomAttributes e ParameterInfo.GetCustomAttributes non possono essere usati in questi casi, perché creano istanze degli attributi. Non è possibile eseguire il codice nel contesto di sola reflection. Per altre informazioni e codice di esempio, vedere la CustomAttributeData classe .

Si applica a