Failure to pass generic arguments with Castle Windsor

前端 未结 1 378
感动是毒
感动是毒 2021-01-23 15:27

There seems to be an issue with passing generic arguments when attempting to create a parametrized instance with Castle Windsor

Demo of Failure to Pass Generic Argument

相关标签:
1条回答
  • 2021-01-23 16:10

    Your SandCoordinator<T> depends on IGenericManager<T>, not GenericManager<T>.

    When you're putting a value in Arguments that you want Windsor to use as something else than its concrete type you have to be explicit about it.

    new Arguments { { typeof(IGenericManager<Simpleton>), runtimeConstructorParam } };
    
    0 讨论(0)
提交回复
热议问题