InheritanceService.AddInheritedComponents 方法

定義

會將指定元件所繼承的元件加入 InheritanceService

多載

AddInheritedComponents(IComponent, IContainer)

會將指定元件所繼承的元件加入 InheritanceService

AddInheritedComponents(Type, IComponent, IContainer)

將由指定元件繼承的指定型別之元件加入 InheritanceService

AddInheritedComponents(IComponent, IContainer)

會將指定元件所繼承的元件加入 InheritanceService

public:
 virtual 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
override this.AddInheritedComponents : System.ComponentModel.IComponent * System.ComponentModel.IContainer -> unit
Public Sub AddInheritedComponents (component As IComponent, container As IContainer)

參數

component
IComponent

元件,用來搜尋要加入至指定容器的繼承元件。

container
IContainer

要加入繼承元件的容器。

實作

備註

這個方法會搜尋指定元件之所有基類的所有欄位。 實作 IComponent 的每個欄位都會新增至指定的容器。

另請參閱

適用於

AddInheritedComponents(Type, IComponent, IContainer)

將由指定元件繼承的指定型別之元件加入 InheritanceService

protected:
 virtual void AddInheritedComponents(Type ^ type, System::ComponentModel::IComponent ^ component, System::ComponentModel::IContainer ^ container);
protected virtual void AddInheritedComponents (Type type, System.ComponentModel.IComponent component, System.ComponentModel.IContainer container);
protected virtual void AddInheritedComponents (Type? type, System.ComponentModel.IComponent component, System.ComponentModel.IContainer container);
abstract member AddInheritedComponents : Type * System.ComponentModel.IComponent * System.ComponentModel.IContainer -> unit
override this.AddInheritedComponents : Type * System.ComponentModel.IComponent * System.ComponentModel.IContainer -> unit
Protected Overridable Sub AddInheritedComponents (type As Type, component As IComponent, container As IContainer)

參數

type
Type

要搜尋的基底型別。

component
IComponent

元件,用來搜尋要加入至指定容器的繼承元件。

container
IContainer

要加入繼承元件的容器。

備註

這個方法會搜尋元件所有基類的所有欄位。 每個實作 IComponent 的欄位都會新增至內部清單,以儲存 InheritanceAttribute 識別元件的繼承層級。 然後,元件會新增至指定的容器。

適用於