TypeDescriptor.CreateEvent TypeDescriptor.CreateEvent TypeDescriptor.CreateEvent TypeDescriptor.CreateEvent Method

Definition

Creates a new event descriptor that is identical to an existing event descriptor.

Overloads

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

Creates a new event descriptor that is identical to an existing event descriptor, when passed the existing EventDescriptor.

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

Creates a new event descriptor that is identical to an existing event descriptor by dynamically generating descriptor information from a specified event on a type.

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

Creates a new event descriptor that is identical to an existing event descriptor, when passed the existing 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

Parameters

componentType
Type Type Type Type

The type of the component for which to create the new event.

oldEventDescriptor
EventDescriptor EventDescriptor EventDescriptor EventDescriptor

The existing event information.

attributes
Attribute[]

The new attributes.

Returns

A new EventDescriptor that has merged the specified metadata attributes with the existing metadata attributes.

Security

ReflectionPermission
Required to inspect non-public members of the component. Link demand access required for ReflectionPermissionFlag type MemberAccess.

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

Creates a new event descriptor that is identical to an existing event descriptor by dynamically generating descriptor information from a specified event on a type.

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

Parameters

componentType
Type Type Type Type

The type of the component the event lives on.

name
String String String String

The name of the event.

type
Type Type Type Type

The type of the delegate that handles the event.

attributes
Attribute[]

The attributes for this event.

Returns

Security

ReflectionPermission
Required to inspect non-public members of the component. Link demand access required for ReflectionPermissionFlag type MemberAccess.

Applies to