英語で読む

次の方法で共有


IInheritanceService.AddInheritedComponents(IComponent, IContainer) メソッド

定義

指定したコンポーネントから IComponent インターフェイスを実装するフィールドを検索し、指定したコンテナーに各フィールドを追加して、GetInheritanceAttribute(IComponent) メソッドで取得できるそれぞれの継承レベルを格納します。

C#
public void AddInheritedComponents (System.ComponentModel.IComponent component, System.ComponentModel.IContainer container);

パラメーター

component
IComponent

検索する IComponent。 このコンポーネントから検索が始まります。

container
IContainer

コンポーネントの追加先となる IContainer

注釈

このメソッドは、 を実装 IComponentするフィールドを指定したコンポーネントで検索し、それぞれを指定されたコンテナーに追加し、それぞれに 対して を InheritanceAttribute 格納します。 コンポーネントの は InheritanceAttribute 、フィールドが基底クラスから継承され、 メソッドを使用して GetInheritanceAttribute 取得できるかどうかを示します。

適用対象

製品 バージョン
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1