Ninject parent child container hierarchy (e.g. inheritance)

Does Ninject have anything like the Unity concept for parent / child containers to provide a basic inheritance model? I googled but found nothing.

+4
source share
2 answers

Ninject supports container hierarchies using https://github.com/ninject/ninject.extensions.childkernel . See also my article http://www.planetgeek.ch/2010/12/08/how-to-use-the-additional-ninject-scopes-of-namedscope/ about additional areas for Ninject. Especially look at the last part. Sometimes it’s better to use this concept rather than container hierarchies.

+6
source

There are activation blocks. No specific documentation is known, but an example is "Cache and Collect" . I would look in tests for more examples.

I am sure that @Remo Gloor will be, but I believe that the general relationship of the team (and the original author) is that nested containers are a bad idea and therefore are unlikely to be supported directly in the kernel (but it can be through extension - for example, contextual saving

+2
source

All Articles