CustomTypeDescriptor.GetEvents 方法

定義

傳回這個型別描述項所表示之物件的事件描述項集合。Returns a collection of event descriptors for the object represented by this type descriptor.

多載

GetEvents()

傳回這個型別描述項所表示之物件的事件描述項集合。Returns a collection of event descriptors for the object represented by this type descriptor.

GetEvents(Attribute[])

傳回這個型別描述項所表示之物件的已篩選事件描述項集合。Returns a filtered collection of event descriptors for the object represented by this type descriptor.

備註

GetEvents方法會傳回這個類型描述元所代表之物件的事件描述項集合。The GetEvents method returns a collection of event descriptors for the object this type descriptor is representing. 可以提供選擇性的屬性陣列,以篩選傳回的集合。An optional attribute array may be provided to filter the collection that is returned. 如果未提供父系,則方法會傳回 EmptyIf no parent is provided, the method will return Empty.

GetEvents()

傳回這個型別描述項所表示之物件的事件描述項集合。Returns a collection of event descriptors for the object represented by this type descriptor.

public:
 virtual System::ComponentModel::EventDescriptorCollection ^ GetEvents();
public virtual System.ComponentModel.EventDescriptorCollection GetEvents ();
abstract member GetEvents : unit -> System.ComponentModel.EventDescriptorCollection
override this.GetEvents : unit -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function GetEvents () As EventDescriptorCollection

傳回

EventDescriptorCollection

EventDescriptorCollection,包含這個型別描述項所描述之物件的事件描述項。An EventDescriptorCollection containing the event descriptors for the object represented by this type descriptor. 預設值為 EmptyThe default is Empty.

實作

備註

如果將父系自訂類型描述元傳遞至函式 CustomTypeDescriptorGetEvents 方法將會呼叫父系的對應方法。If a parent custom type descriptor was passed into the CustomTypeDescriptor constructor, the GetEvents method will call the parent's corresponding method.

另請參閱

適用於

GetEvents(Attribute[])

傳回這個型別描述項所表示之物件的已篩選事件描述項集合。Returns a filtered collection of event descriptors for the object represented by this type descriptor.

public:
 virtual System::ComponentModel::EventDescriptorCollection ^ GetEvents(cli::array <Attribute ^> ^ attributes);
public virtual System.ComponentModel.EventDescriptorCollection GetEvents (Attribute[] attributes);
abstract member GetEvents : Attribute[] -> System.ComponentModel.EventDescriptorCollection
override this.GetEvents : Attribute[] -> System.ComponentModel.EventDescriptorCollection
Public Overridable Function GetEvents (attributes As Attribute()) As EventDescriptorCollection

參數

attributes
Attribute[]

當做篩選條件之型別的陣列。An array of attributes to use as a filter. 這可以是 nullThis can be null.

傳回

EventDescriptorCollection

EventDescriptorCollection,包含這個型別描述項所描述之物件的事件描述項。An EventDescriptorCollection containing the event descriptions for the object represented by this type descriptor. 預設值為 EmptyThe default is Empty.

實作

備註

您可以使用 attributes 參數來篩選所傳回的集合。You can use the attributes parameter to filter the collection that is returned.

如果將父系自訂類型描述元傳遞至函式 CustomTypeDescriptorGetEvents 方法將會呼叫父系的對應方法。If a parent custom type descriptor was passed into the CustomTypeDescriptor constructor, the GetEvents method will call the parent's corresponding method.

另請參閱

適用於