EventBuilder.SetCustomAttribute Метод

Определение

Задает настраиваемые атрибуты для этого EventBuilder.

Перегрузки

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

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

SetCustomAttribute(ConstructorInfo, Byte[])

Задайте настраиваемый атрибут с помощью указанного пользовательского blob-объекта атрибута.

SetCustomAttribute(CustomAttributeBuilder)

Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.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.

CreateType() вызывается для включающего типа.

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

SetCustomAttribute(ConstructorInfo, Byte[])

Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.cs
Исходный код:
EventBuilder.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[]

Байтовый большой двоичный объект, представляющий атрибуты.

Атрибуты

Исключения

con или binaryAttribute есть null.

CreateType() вызывается для включающего типа.

Комментарии

Сведения о форматировании binaryAttributeсм. в спецификации метаданных в разделе II спецификации CLR.

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