How do I transfer configuration data into injected objects?

Posted by louis on Stack Overflow See other posts from Stack Overflow or by louis
Published on 2010-04-27T16:10:23Z Indexed on 2010/04/27 16:13 UTC
Read the original article Hit count: 195

Filed under:
|

I used to use Spring.Net and want to switch to Ninject 1.5 (I have to use .NET2, since some unlucky guy like me still needs to consider users working with win 2k). I used to have everything done in xml and only invoke the container during startup. In this way, only very limited codes are depending on container. I have scenarios like this and I wonder how to do the same in Ninject.

I have external config file, which are the items the end users can change basing on their environment/preferences. And some of my objects depends on those values to initialize. Mostly they are primary values, but some times can be list/dictionaries/etc.

© Stack Overflow or respective owner

Related posts about ninject-1

Related posts about ninject