This project has moved and is read-only. For the latest updates, please go here.

MEF Configuration

Dec 23, 2009 at 2:45 AM
Edited Dec 23, 2009 at 3:08 AM

Let's say I have some configuration in my application such as host and port of the server. I would like to inject host and port configuration into my connection object to the server. How can this be done best with MEF?

Dec 23, 2009 at 6:37 AM

I'm thinking about having a connection builder class that will wrap the creation of the connection.

this builder can have it's own Import for the configuration injection and with that knowledge you will

be able of building the concrete connection

Jan 4, 2010 at 2:07 AM

For this one, I resolved it by having an interface exposing all the configurations and having all classes needed the configuration to refer to this interface.