IInheritanceService.AddInheritedComponents(IComponent, IContainer) 方法

定義

搜尋指定的元件,以找出實作 IComponent 介面的欄位,並將每一個欄位加入指定的容器,以儲存每一個欄位的繼承層級 (可利用 GetInheritanceAttribute(IComponent) 方法來擷取繼承層級)。

public:
 void AddInheritedComponents(System::ComponentModel::IComponent ^ component, System::ComponentModel::IContainer ^ container);
public void AddInheritedComponents (System.ComponentModel.IComponent component, System.ComponentModel.IContainer container);
abstract member AddInheritedComponents : System.ComponentModel.IComponent * System.ComponentModel.IContainer -> unit
Public Sub AddInheritedComponents (component As IComponent, container As IContainer)

參數

component
IComponent

要搜尋的 IComponent。 搜尋作業從這個元件開始。

container
IContainer

要加入元件的 IContainer

備註

此方法會搜尋指定元件中實作 的任何欄位,並將每個欄位 IComponent新增至指定的容器,並儲存 InheritanceAttribute 每個欄位的 。 元件的 InheritanceAttribute 會指出欄位是否繼承自基類,而且可以使用 方法擷 GetInheritanceAttribute 取。

適用於