This project is read-only.

IoC - Ninject

Balder relies on dependencies given to the different parts of the system in the form of parameters to the constructors of the different sub-systems. These are typically automatically resolved by an IoC (Inversion of Control) container called Ninject. Internally Balder sets up the container and configures it based upon conventions and explicit configuration defined per target device, such as Silverlight and Windows Phone 7.


The only convention Balder has defined is a convention that automatically resolves any interface prefixed with the letter I to a concrete type with the same name without the I prefix. This is handled in something called AutoKernel. When Ninject tries to resolve something and it can't be resolved by the default binder in Ninject, the AutoKernel will try to resolve it using this convention.


The IPlatform defines the capabilities of the target device Balder is running on, it defines the different types that Balder needs during dependency resolving. Such as the DisplayDevice, which defines the capabilities of the targets Display. It also holds the details of the different renderable types and their contexts as they are called.

Last edited Dec 27, 2010 at 5:44 PM by adept, version 2


No comments yet.