IOC on IValidationDictionary with Castle Windsor

后端 未结 2 1543
野性不改
野性不改 2021-01-21 18:02

I\'m new to Castle Windsor and am just using the latest version. I\'ve created entries for my repositories which are working fine but I have one final dependency that I\'m passi

2条回答
  •  囚心锁ツ
    2021-01-21 18:46

    It seems like you have a circular dependency (never a good thing). You can get around it by using an Abstract Factory as described in this very similar question.

    However, although you may be able to solve the problem like this, it would be better to redesign the API to make the circular dependency go away. Circular dependencies often indicate a design flaw.

提交回复
热议问题