ITypeDescriptorFilterService.FilterEvents(IComponent, IDictionary) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
篩選元件透過 TypeDescriptor 所公開的事件。
public:
bool FilterEvents(System::ComponentModel::IComponent ^ component, System::Collections::IDictionary ^ events);
public bool FilterEvents (System.ComponentModel.IComponent component, System.Collections.IDictionary events);
abstract member FilterEvents : System.ComponentModel.IComponent * System.Collections.IDictionary -> bool
Public Function FilterEvents (component As IComponent, events As IDictionary) As Boolean
參數
- component
- IComponent
要為其篩選事件的元件。
- events
- IDictionary
可以修改的事件字典。
傳回
如果要對篩選的事件集進行快取,則為 true
,否則為 false
。
備註
當使用者要求元件的一組事件時,會呼叫這個方法。 事件會新增至字典,其中包含事件名稱做為索引鍵,而對應的 EventDescriptor 物件則做為值。 此服務的實作者可以在字典中新增、移除或改變事件專案。
給實施者的注意事項
只有在需要時才傳回 false
,因為對型別描述元篩選服務的重複查詢可能會降低效能。