GenericTypeParameterBuilder.SetCustomAttribute Método

Definição

Define um atributo personalizado.

Sobrecargas

SetCustomAttribute(CustomAttributeBuilder)

Defina um atributo personalizado usando um construtor de atributos personalizados.

SetCustomAttribute(ConstructorInfo, Byte[])

Define um atributo personalizado usando um blob de atributo personalizado especificado.

SetCustomAttribute(CustomAttributeBuilder)

Origem:
GenericTypeParameterBuilder.cs
Origem:
GenericTypeParameterBuilder.cs
Origem:
GenericTypeParameterBuilder.cs

Defina um atributo personalizado usando um construtor de atributos personalizados.

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

Uma instância de uma classe auxiliar que define o atributo personalizado.

Exceções

customBuilder é null.

Aplica-se a

SetCustomAttribute(ConstructorInfo, Byte[])

Origem:
GenericTypeParameterBuilder.cs
Origem:
GenericTypeParameterBuilder.cs
Origem:
GenericTypeParameterBuilder.cs

Define um atributo personalizado usando um 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);
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
Public Sub SetCustomAttribute (con As ConstructorInfo, binaryAttribute As Byte())

Parâmetros

con
ConstructorInfo

O construtor do atributo personalizado.

binaryAttribute
Byte[]

Um blob de byte que representa o atributo.

Exceções

con é null.

- ou -

binaryAttribute é uma referência nula.

Comentários

Para obter informações sobre como formatar binaryAttribute, consulte a especificação de metadados na Partição II da especificação da CLI (Common Language Infrastructure).

Aplica-se a