ParameterInfo.GetCustomAttributesData Método

Definición

Devuelve una lista de objetos CustomAttributeData del parámetro actual, que puede utilizarse en el contexto de solo reflexión.

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)

Devoluciones

Lista genérica de objetos CustomAttributeData que representan datos acerca de los atributos que se han aplicado al parámetro actual.

Comentarios

Use este método para examinar los atributos personalizados del código en el contexto de solo reflexión, en los casos en los que los propios atributos personalizados se definen en el código que se carga en el contexto de solo reflexión. Los métodos como Attribute.GetCustomAttributes y ParameterInfo.GetCustomAttributes no se pueden usar en tales casos, ya que crean instancias de los atributos. No se puede ejecutar código en el contexto de solo reflexión. Para obtener más información y código de ejemplo, vea la CustomAttributeData clase .

Se aplica a