Skip to main content
10 events
when toggle format what by license comment
Dec 21, 2012 at 12:05 vote accept TheSilverBullet
Dec 21, 2012 at 11:11 comment added TheSilverBullet This is interesting! I did not think the IoC container could be used this way! I have re-written my code taking some of your inputs. I will be making another question on this site and will link it up to this questions. Your comments there would be appreciated! Thanks, almaz.
Dec 20, 2012 at 16:33 comment added almaz The IoC framework makes decision what to inject at the time of resolving the instance (container.Resolve<TheOracle>()). At that time it injects all the instance it is aware of.
Dec 20, 2012 at 13:59 comment added TheSilverBullet builder.RegisterType<WritePredictions>().AsImplementedInterfaces(); - I got the line. So once this line executes, would the IWriter property be set to WritePredictions?
Dec 20, 2012 at 13:52 comment added TheSilverBullet Looks like you have included DI and use of IoC container in lesser piece of code than I originally wrote. This is good! Thanks! But one thing I did not understand is how you injected the Writer. Can you point me to the line specifically... (Sorry!)
Dec 20, 2012 at 13:50 comment added TheSilverBullet I wanted to use my own IoC container so that I would understand it better. I would ofcourse shift to Autofac later.
Dec 20, 2012 at 12:15 comment added almaz @TheSilverBullet updated my answer
Dec 20, 2012 at 12:14 history edited almaz CC BY-SA 3.0
Added example
Dec 20, 2012 at 11:48 comment added TheSilverBullet Can you give me a small example for illustrating the power of DI? Also, how else do you think an IoC container needs to be used? Can you give me an example?
Dec 20, 2012 at 11:38 history answered almaz CC BY-SA 3.0