ITypeDescriptorFilterService.FilterAttributes(IComponent, IDictionary) 方法

定義

篩選元件透過 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 ,因為對類型描述項篩選服務的重複查詢可能會降低效能。

適用於

另請參閱