ModuleBuilder.SetCustomAttribute Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Applica un attributo personalizzato a questo modulo.
Overload
| Nome | Descrizione |
|---|---|
| SetCustomAttribute(CustomAttributeBuilder) |
Applica un attributo personalizzato a questo modulo usando un generatore di attributi personalizzato. |
| SetCustomAttribute(ConstructorInfo, Byte[]) |
Applica un attributo personalizzato a questo modulo usando un oggetto BLOB (Binary Large Object) specificato che rappresenta l'attributo . |
SetCustomAttribute(CustomAttributeBuilder)
Applica un attributo personalizzato a questo modulo usando un generatore di attributi personalizzato.
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)
Parametri
- customBuilder
- CustomAttributeBuilder
Istanza di una classe helper che specifica l'attributo personalizzato da applicare.
Eccezioni
customBuilder è null.
Si applica a
SetCustomAttribute(ConstructorInfo, Byte[])
Applica un attributo personalizzato a questo modulo usando un oggetto BLOB (Binary Large Object) specificato che rappresenta l'attributo .
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())
Parametri
- con
- ConstructorInfo
Costruttore per l'attributo personalizzato.
- binaryAttribute
- Byte[]
BLOB di byte che rappresenta l'attributo .
- Attributi
Eccezioni
con o binaryAttribute è null.
Commenti
Per altre informazioni su come formattare binaryAttribute, vedere la documentazione di Common Language Infrastructure (CLI), in particolare "Partition II: Metadata Definition and Semantics". Per altre informazioni, vedere ECMA 335 Common Language Infrastructure (CLI).For more information, see ECMA 335 Common Language Infrastructure (CLI).