EventBuilder.SetCustomAttribute Méthode

Définition

Définit les attributs personnalisés de EventBuilder.

Surcharges

SetCustomAttribute(CustomAttributeBuilder)

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

SetCustomAttribute(ConstructorInfo, Byte[])

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

SetCustomAttribute(CustomAttributeBuilder)

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

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

con a la valeur null.

La méthode CreateType() a été appelée sur le type englobant.

S’applique à

SetCustomAttribute(ConstructorInfo, Byte[])

Définit un attribut personnalisé à l’aide d’un objet blob d’attribut 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

Le constructeur de l’attribut personnalisé.

binaryAttribute
Byte[]

Objet blob d’octets représentant les attributs.

Attributs

Exceptions

con ou binaryAttribute est null.

La méthode CreateType() a été appelée sur le type englobant.

Remarques

Pour plus d’informations sur la mise en forme binaryAttribute, consultez la spécification des métadonnées dans Partition II de la spécification Cli (Common Language Infrastructure).

S’applique à