Showing posts with label Unity. Show all posts
Showing posts with label Unity. Show all posts

Tuesday, February 12, 2013

WinRT, Caliburn.Micro and IoC - Part 2 (Unity)

In a previous post I started by wrapping Ninject (or the closest build I could find that worked with WinRT) for use in Caliburn.Micro.

I wanted to do the same thing for Unity, so I could compare and contrast the two in WinRT applications.  The good news is that Unity has a WinRT build. The bad news is only the core dll is available in WinRT.  Also the UnityServiceLocator.cs file is not included in the default build.  You will either need to copy the code into your project, or pull down the source, and rebuild after including the cs file into the WinRT project.

For those who don't want to pull down the source, you can just add this class to your project: