ITypeDescriptorFilterService.FilterProperties(IComponent, IDictionary) 方法
定义
筛选组件通过 TypeDescriptor 公开的属性。Filters the properties that a component exposes through a TypeDescriptor.
public:
bool FilterProperties(System::ComponentModel::IComponent ^ component, System::Collections::IDictionary ^ properties);
public bool FilterProperties (System.ComponentModel.IComponent component, System.Collections.IDictionary properties);
abstract member FilterProperties : System.ComponentModel.IComponent * System.Collections.IDictionary -> bool
Public Function FilterProperties (component As IComponent, properties As IDictionary) As Boolean
参数
- component
- IComponent
要为其筛选属性的组件。The component to filter properties for.
- properties
- IDictionary
可修改的属性字典。A dictionary of properties that can be modified.
返回
如果将缓存经过筛选的属性集,则为 true;如果筛选服务必须再次查询,则为 false。true if the set of filtered properties is to be cached; false if the filter service must query again.
注解
当用户请求组件的一组属性时,将调用此方法。This method is called when a user requests a set of properties for a component. 这些属性将添加到字典中,其中的属性名作为键,并将相应的 PropertyDescriptor 对象作为值。The properties are added to the dictionary with the property names as the keys and the corresponding PropertyDescriptor objects as the values. 此服务的实现者可以在字典中添加、删除或更改属性项。Implementers of this service can add, remove, or alter property entries in the dictionary.
实施者说明
false仅在必要时返回,因为对类型描述符筛选器服务的重复查询会降低性能。Return false only when necessary, because repeated queries to the type descriptor filter service can decrease performance.