I have a single Ninject 2 Kernel for my application which contains all bindings. One section of the application needs to have different settings on the Kernel than the rest of the application, but needs the same bindings (that portion is for NHibernate and needs InjectNonPublic = true
and the InjectAttribute
set). How can a make a Kernel that shares bindings with the current kernel but has different settings?
I believe that in other IOC containers this is would be achieved with a "nested container", however I don't see any support for nested containers in Ninject?