Are there facilities in NInject that will allow me to load services from other modules (assemblies) on demand like it's done in Unity?
相关问题
- Slow loading first page - ASP.NET MVC
- How can my C# program behave differently depending
- Validation Attribute get triggered two times
- Constructor Argument Enums and Magic Strings
- NserviceBus property injection
相关文章
- TinyIoC: Register multiple interfaces on a single
- What is a satellite assembly?
- Restlet server resource with constructor parameter
- Injecting an IEnumerable into a constructor with a
- ASP.NET - bin Directory vs. Adding Assembly in web
- UnitOfWork in Action Filter seems to be caching
- Why is assembly binding redirect not working in my
- Castle Windsor: How do you add a call to a factory
I'm pretty sure this is what you're looking for:
If you look at KernelBase with reflector in Ninject.dll you will see that this call will recursively load all modules in the loaded assemblies (Load method takes an IEnumerable)
If you're referring to loading Assemblies non-statically out of the box, no it doesnt.
There are many other questions on this, e.g., Using Ninject in a plugin like architecture
I don't quite understand what you mean by "Like Unity" but you can do a few different things for loading assemblies. Ninject itself will load local assemblies for extensions/plugins by default. Ninject can also load NinjectModule classes from assemblies. If you want to do something more complex, you can use the Ninject.Extensions.Conventions project to do a lot of different scanning and type binding.