EventBuilder.SetCustomAttribute Metoda

Definice

Nastaví vlastní atributy pro tento EventBuilder.

Přetížení

SetCustomAttribute(CustomAttributeBuilder)

Nastaví vlastní atribut pomocí vlastního tvůrce atributů.

SetCustomAttribute(ConstructorInfo, Byte[])

Nastavte vlastní atribut pomocí zadaného objektu blob vlastního atributu.

SetCustomAttribute(CustomAttributeBuilder)

Zdroj:
EventBuilder.cs
Zdroj:
EventBuilder.cs
Zdroj:
EventBuilder.cs

Nastaví vlastní atribut pomocí vlastního tvůrce atributů.

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)

Parametry

customBuilder
CustomAttributeBuilder

Instance pomocné třídy popisovat vlastní atribut.

Výjimky

con je null.

CreateType() byla volána u ohraničujícího typu.

Platí pro

SetCustomAttribute(ConstructorInfo, Byte[])

Zdroj:
EventBuilder.cs
Zdroj:
EventBuilder.cs
Zdroj:
EventBuilder.cs

Nastavte vlastní atribut pomocí zadaného objektu blob vlastního atributu.

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

Parametry

con
ConstructorInfo

Konstruktor pro vlastní atribut.

binaryAttribute
Byte[]

Bajt objekt blob představující atributy.

Atributy

Výjimky

con nebo binaryAttribute je null.

CreateType() byla volána u ohraničujícího typu.

Poznámky

Informace o tom, jak formátovat binaryAttribute, najdete ve specifikaci metadat v oddílu II specifikace common language infrastructure (CLI).

Platí pro