ITypeDescriptorFilterService.FilterEvents(IComponent, IDictionary) 方法

定义

筛选组件通过 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 ,因为对类型描述符筛选器服务的重复查询可能会降低性能。

适用于

另请参阅