If you downloaded this source prior to 10th September 2009, please download again. A rather naughty error had crept into the original design, which has now been corrected. In the previous version we were injecting the Unity container into the Module definitions (very naughty if you don't need it). This version removes the Dependency on Unity, you will notice in the one place where we need a handle on the DI container that this point makes no mention of Unity (the adapter pattern helps us out here!)
Click here to download the source for the solution.
After downloading and extracting the .zip file, you will need to build the solution using Microsoft Visual Studio 8 SP1
Upon running the application, you are presented with an empty form. The menu gives you the option of either exiting the application, or Loading the UI module.
Clicking on the Load UI menu item, as you would expect, loads the calculator UI. The calculator is very simple and only handles addition, subtraction, multiplication, and division.
The application has been purposefully modelled to start up in this fashion to demonstrate the loading of modules at application start up and on demand. Within the code, there is also an example loading services declaratively (the same can be done with Modules, but this has not been exemplified), however this application primarily demonstrates the loading of modules via configuration.
IoC is demonstrated utilizing the Microsoft Unity Application Block Dependency Injection containers.