構成を必要とせずに IoC を使用するフレームワークを作成したいと思います。
その代わりに(http://www.castleproject.org/container/gettingstarted/part1/code.htmlから調整):
IWindsorContainer container = new WindsorContainer();
container.AddComponent("someinterface", typeof(ISomeInterface));
ISomeInterface component = (ISomeInterface) container[typeof(ISomeInterface)];
component.DoIt();
container.Release(component);
container.AddComponent
ISomeComponent を実装し、それらを WindsorContainer に登録したクラスを含む dll を既知のディレクトリで検索することにより、いくつかの「自動配線」を実行する最初のステップがあったため、メソッドを呼び出す必要はありません。
これは最初から実行できることがわかりますが、理想的には、既にそれを実行しているオープン ソース プロジェクトがそこにある場合、このコードを書き直したくありません!