How do I export and import application services with say MEF?

Posted by John Leidegren on Stack Overflow See other posts from Stack Overflow or by John Leidegren
Published on 2010-03-31T19:31:52Z Indexed on 2010/03/31 19:43 UTC
Read the original article Hit count: 335

Filed under:
|
|

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.

alt text

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).

© Stack Overflow or respective owner

Related posts about MEF

Related posts about dependency-injection