TypeDescriptor.CreateEvent Метод

Определение

Создает новый дескриптор событий, идентичный существующему дескриптору событий.

Перегрузки

Имя Описание
CreateEvent(Type, EventDescriptor, Attribute[])

Создает новый дескриптор событий, идентичный существующему дескриптору событий при передаче существующего EventDescriptorдескриптора.

CreateEvent(Type, String, Type, Attribute[])

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

CreateEvent(Type, EventDescriptor, Attribute[])

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

Создает новый дескриптор событий, идентичный существующему дескриптору событий при передаче существующего EventDescriptorдескриптора.

public:
 static System::ComponentModel::EventDescriptor ^ CreateEvent(Type ^ componentType, System::ComponentModel::EventDescriptor ^ oldEventDescriptor, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptor CreateEvent(Type componentType, System.ComponentModel.EventDescriptor oldEventDescriptor, params Attribute[] attributes);
static member CreateEvent : Type * System.ComponentModel.EventDescriptor * Attribute[] -> System.ComponentModel.EventDescriptor
Public Shared Function CreateEvent (componentType As Type, oldEventDescriptor As EventDescriptor, ParamArray attributes As Attribute()) As EventDescriptor

Параметры

componentType
Type

Тип компонента, для которого создается новое событие.

oldEventDescriptor
EventDescriptor

Существующие сведения о событии.

attributes
Attribute[]

Новые атрибуты.

Возвращаемое значение

Новое EventDescriptor , которое объединило указанные атрибуты метаданных с существующими атрибутами метаданных.

См. также раздел

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

CreateEvent(Type, String, Type, Attribute[])

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

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

public:
 static System::ComponentModel::EventDescriptor ^ CreateEvent(Type ^ componentType, System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptor CreateEvent(Type componentType, string name, Type type, params Attribute[] attributes);
static member CreateEvent : Type * string * Type * Attribute[] -> System.ComponentModel.EventDescriptor
Public Shared Function CreateEvent (componentType As Type, name As String, type As Type, ParamArray attributes As Attribute()) As EventDescriptor

Параметры

componentType
Type

Тип компонента, на который происходит событие.

name
String

Название мероприятия.

type
Type

Тип делегата, обрабатывающего событие.

attributes
Attribute[]

Атрибуты этого события.

Возвращаемое значение

Объект, EventDescriptor привязанный к типу.

См. также раздел

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