January 2012 Entries

A bit more about Using Ninject 2.2 - factory methods

(Credit: Image used is from http://fav.me/d2pz3om, if the author objects, I'll remove it immedietly)As I understand it, Ninject 2.3 will have a .Bind<T>().ToFactory() Method. In the mean time, though, what do we do when we need to bind at run time? Let's say we have a Ninja class, which we want to send off to... well, 'off' someone. The problem is, we don't know, at design time, if the target will be roaming around a snowy area, or somewhere dark. So which Ninja instance will we need? The one ......