开发者

how do use Ninject with class libraries I am developing?

If I am working on a class library how do I make use of Ninject here? i.e., from the internal class library point of view and also from the cl开发者_StackOverflow中文版ient code?

For example:

  • should the class library have its own IOC set up, or should it always assume the client code will supply?

  • if no (ie it's up to the client to have the IOC in place) then where is the mapping data stored here'. Is this mapping of the class library's functionality to be placed in the client?


If the client doesn't have an IOC what happens? Should they specify an IOC?

If the client does have an IOC does your IOC need to interact with theirs?

I don't see a problem with 2 (or more) IOC's working independently in the same app. But if the IOC's are creating the same objects then they should be put together.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜