Kodama

ComponentContainerImpl.GetComponent メソッド (Type)

[This is preliminary documentation and subject to change.]

コンポーネントを取得する

public object GetComponent(
   Type componentType
);

パラメータ

componentType
取得するコンポーネントの型

戻り値

引数にわたされた型のコンポーネント

実装

IComponentContainer.GetComponent

例外

例外の種類 条件
CyclicDependencyException 依存関係が循環しているときに発生する例外
TooManyRegistrationException 指定されたインターフェイスを実装するコンポーネントが複数合った場合に発生する例外
ComponentNotFoundException 指定されたインターフェイスを実装するコンポーネントがなかった場合に発生する例外
CyclicDependencyException コンポーネントの依存関係が循環していてかつ、循環しているコンポーネントが Prototypeモードの場合に発生する例外

参照

ComponentContainerImpl クラス | Kodama.DependencyInjection.Container 名前空間