EventBuilder.SetCustomAttribute Méthode

Définition

Définit des attributs personnalisés pour cet EventBuilder.

Surcharges

Nom Description
SetCustomAttribute(CustomAttributeBuilder)

Définit un attribut personnalisé à l’aide d’un générateur d’attributs personnalisé.

SetCustomAttribute(ConstructorInfo, Byte[])

Définissez un attribut personnalisé à l’aide d’un objet blob d’attributs personnalisé spécifié.

SetCustomAttribute(CustomAttributeBuilder)

Définit un attribut personnalisé à l’aide d’un générateur d’attributs personnalisé.

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)

Paramètres

customBuilder
CustomAttributeBuilder

Instance d’une classe d’assistance pour décrire l’attribut personnalisé.

Exceptions

customBuilder a la valeur null.

CreateType() a été appelé sur le type englobant.

S’applique à

SetCustomAttribute(ConstructorInfo, Byte[])

Définissez un attribut personnalisé à l’aide d’un objet blob d’attributs personnalisé spécifié.

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())

Paramètres

con
ConstructorInfo

Constructeur de l’attribut personnalisé.

binaryAttribute
Byte[]

Objet blob d’octets représentant les attributs.

Attributs

Exceptions

con ou binaryAttribute est null.

CreateType() a été appelé sur le type englobant.

Remarques

Pour plus d’informations sur la mise en formebinaryAttribute, consultez la spécification des métadonnées dans partition II de la spécification CLI (Common Language Infrastructure).

S’applique à