IInheritanceService 介面

定義

提供識別某個元件的元件之方法。

public interface class IInheritanceService
public interface IInheritanceService
type IInheritanceService = interface
Public Interface IInheritanceService
衍生

備註

這個介面提供方法,可用來識別繼承自基類之元件的元件。

若要判斷繼承哪些元件,請呼叫 方法, AddInheritedComponents 並將元件傳遞至搜尋,以及 IContainer 用來儲存已識別元件的參考。 GetInheritanceAttribute呼叫 方法,以擷取 InheritanceAttribute 方法所AddInheritedComponents識別之元件的 。

方法

AddInheritedComponents(IComponent, IContainer)

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

GetInheritanceAttribute(IComponent)

取得指定元件的繼承屬性。

適用於

另請參閱