I'm getting my feet wet with DI/IoC and MEF in particular.
I have a web application that has two types of parts (maybe more someday) defined by interfaces which need access to the whole environment. The application has a list with concrete implementations for each type, composed by MEF.
The environment consists of:
- several repositories
- current application request
- render engine
- navigation engine
- plus some static utility classes
How can I put the Interface definitions in a seperate assembly and at the same time specify the environment injection?
Obviously, I can't just reference the main assembly because that needs to reference the contract assembly and I can't create a circular reference.
It seems that I need to create an interface for each of the environment classes, and their publicly available types and so on... There has to be a better way?!
Maybe I'm also missing the obvious bigger flaw here, if anyone could point it out for me?