How do I pass configuration data to injected objects?

I was using Spring.Net and want to switch to Ninject 1.5 (I have to use .NET2 since some unlucky guys like me still need to consider users running win 2k). I used to do everything in xml and call the container at startup time. Thus, only very limited codes are container dependent. I have scripts like this and am wondering how to do the same in Ninject.

I have an external config file that are objects that end users can modify based on their environment / preference. And some of my objects depend on these values ​​for initialization. These are mostly primary values, but sometimes they can be lists / dictionaries / etc.

+2


a source to share


1 answer


Got it on my own. Follow this link: http://java2cs2.blogspot.com/2010/04/passing-external-configuration-data-to.html



+1


a source







All Articles