> Is it possible to to something like:
>
> var workers = kernel.GetAll<IWorker>(); // I want to get 3 instances
> foreach(var worker in workers)
> worker.DoWork();
>
Ninject 2 has Common Service Locator support. Nate was even kind
enough to write an implementation for the ServiceLocator from
Microsoft (Best Practices).
At Github (
http://github.com/enkari/ninject/tree/master) you can find
the latest version of Ninject 2.
Site node: Don't forget to always add a 'using Ninject' statement as
the Get* methods are implemented as extension methods.
StandardModule has been renamed to NinjectModule. If you have an older
version (like the one Nate published on his blog you need Module)
Regards,
Dave