Failure to pass generic arguments with Castle Windsor

前端 未结 1 379
感动是毒
感动是毒 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 depends on IGenericManager, not GenericManager.

    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), runtimeConstructorParam } };
    

    0 讨论(0)
提交回复
热议问题