考慮してください:
public class CtorInjectionExample
{
    public CtorInjectionExample(ISomeRepository SomeRepositoryIn, IOtherRepository OtherRepositoryIn)
    {
        this._someRepository = SomeRepositoryIn;
        this._otherRepository = OtherRepositoryIn;
    }
    public void SomeMethod()
    {
        //use this._someRepository
    }
    public void OtherMethod()
    {
        //use this._otherRepository
    }
}
に対して:
public class MethodInjectionExample
{
    public MethodInjectionExample()
    {
    }
    public void SomeMethod(ISomeRepository SomeRepositoryIn)
    {
        //use SomeRepositoryIn
    }
    public void OtherMethod(IOtherRepository OtherRepositoryIn)
    {
        //use OtherRepositoryIn
    }
}
Ctorインジェクションは拡張を困難にしますが(新しい依存関係が追加されたときにctorを呼び出すコードは更新する必要があります)、メソッドレベルのインジェクションはクラスレベルの依存関係からカプセル化されたままになり、これらのアプローチに対する/他の引数を見つけることができません。
注射のための決定的なアプローチはありますか?
(NB私はこれに関する情報を検索し、この質問を客観的にしようとしました。)