How do I export and import application services with say MEF?
- by John Leidegren
I'm working with MEF right now, but the answer I'm looking for probably is irrelevant to MEF -- it's all dependency injection -- I'm just using MEF terminology as an example here.
Short background story, I read this article over at MSDN with focus on Composite Applications
In this figure there's three things, the shell, the application services and the modules. So that's a composite application.
What I don't fully get is the application services part. What's the service, what does it look like? How do you expose a service through a module and how do you consume a service from a different module?
I'd really like to see some neat small code examples, nothing fancy but something to illustrate how all this comes to life (the application services part).