EventBuilder.SetCustomAttribute Método

Definición

Establece los atributos personalizados para este EventBuilder.

Sobrecargas

SetCustomAttribute(CustomAttributeBuilder)

Establece un atributo personalizado mediante un generador de atributos personalizado.

SetCustomAttribute(ConstructorInfo, Byte[])

Establece un atributo personalizado mediante un blob de atributo personalizado especificado.

SetCustomAttribute(CustomAttributeBuilder)

Establece un atributo personalizado mediante un generador de atributos personalizado.

public:
 void SetCustomAttribute(System::Reflection::Emit::CustomAttributeBuilder ^ customBuilder);
public void SetCustomAttribute (System.Reflection.Emit.CustomAttributeBuilder customBuilder);
member this.SetCustomAttribute : System.Reflection.Emit.CustomAttributeBuilder -> unit
Public Sub SetCustomAttribute (customBuilder As CustomAttributeBuilder)

Parámetros

customBuilder
CustomAttributeBuilder

Instancia de una clase del asistente para describir el atributo personalizado.

Excepciones

con es null.

Se ha llamado a CreateType() en el tipo envolvente.

Se aplica a

SetCustomAttribute(ConstructorInfo, Byte[])

Establece un atributo personalizado mediante un blob de atributo personalizado especificado.

public:
 void SetCustomAttribute(System::Reflection::ConstructorInfo ^ con, cli::array <System::Byte> ^ binaryAttribute);
public void SetCustomAttribute (System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
[System.Runtime.InteropServices.ComVisible(true)]
public void SetCustomAttribute (System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
Public Sub SetCustomAttribute (con As ConstructorInfo, binaryAttribute As Byte())

Parámetros

con
ConstructorInfo

Constructor para el atributo personalizado.

binaryAttribute
Byte[]

Blob de bytes que representa los atributos.

Atributos

Excepciones

con o binaryAttribute es null.

Se ha llamado a CreateType() en el tipo envolvente.

Comentarios

Para obtener información sobre cómo dar formato binaryAttributea , consulte la especificación de metadatos en la especificación de partición II de Common Language Infrastructure (CLI).

Se aplica a