ModuleBuilder.SetCustomAttribute Метод

Определение

Применяет настраиваемый атрибут к этому модулю.

Перегрузки

Имя Описание
SetCustomAttribute(CustomAttributeBuilder)

Применяет настраиваемый атрибут к этому модулю с помощью пользовательского построителя атрибутов.

SetCustomAttribute(ConstructorInfo, Byte[])

Применяет настраиваемый атрибут к этому модулю с помощью указанного двоичного большого объекта (BLOB), представляющего атрибут.

SetCustomAttribute(CustomAttributeBuilder)

Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs

Применяет настраиваемый атрибут к этому модулю с помощью пользовательского построителя атрибутов.

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)

Параметры

customBuilder
CustomAttributeBuilder

Экземпляр вспомогательного класса, указывающий настраиваемый атрибут для применения.

Исключения

customBuilder равно null.

Применяется к

SetCustomAttribute(ConstructorInfo, Byte[])

Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs
Исходный код:
ModuleBuilder.cs

Применяет настраиваемый атрибут к этому модулю с помощью указанного двоичного большого объекта (BLOB), представляющего атрибут.

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

Параметры

con
ConstructorInfo

Конструктор для пользовательского атрибута.

binaryAttribute
Byte[]

Байтовый BLOB-объект, представляющий атрибут.

Атрибуты

Исключения

con или binaryAttribute есть null.

Комментарии

Дополнительные сведения о форматировании binaryAttributeсм. в документации по инфраструктуре общего языка (CLI), особенно "Partition II: Metadata Definition and Semantics". Дополнительные сведения см. в статье ECMA 335 Common Language Infrastructure (CLI).

Применяется к