ITypeDescriptorFilterService.FilterAttributes(IComponent, IDictionary) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
筛选组件通过 TypeDescriptor 公开的特性。
public:
bool FilterAttributes(System::ComponentModel::IComponent ^ component, System::Collections::IDictionary ^ attributes);
public bool FilterAttributes (System.ComponentModel.IComponent component, System.Collections.IDictionary attributes);
abstract member FilterAttributes : System.ComponentModel.IComponent * System.Collections.IDictionary -> bool
Public Function FilterAttributes (component As IComponent, attributes As IDictionary) As Boolean
参数
- component
- IComponent
要筛选其属性的组件。
- attributes
- IDictionary
可修改的属性字典。
返回
如果将缓存经过筛选的特性集,则为 true
;如果筛选服务必须再次查询,则为 false
。
注解
当用户请求组件的一组属性时,将调用此方法。 属性将添加到字典中,其中属性的 TypeId 作为键,实际属性作为值。 此服务的实现者可以在字典中添加、删除或更改现有属性条目。
实施者说明
仅在必要时返回 false
,因为对类型描述符筛选器服务的重复查询可能会降低性能。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈