Programming on Windows Phone 7 is still a fairly new concept, new articles are surfacing frequently about how you can architect your new WP7 apps. However not many that I have seen are suggesting that components should be resolved via an IoC container. Although there are reasons for this, it is primarily boiling down to the fact that many authors feel concessions need to be made because the code is running on a limited platform. I agree with this to an extent, however I do feel that there it is still important that we don't just outright forget about the good practices that have been brewing in the industry for a while now.
The WP7 branch has been merged back to the official Autofac Project.
Firstly, to gain higher confidence the Autofac tests now have a special testing harness so that they can be run in the emulator and also on a physical device.
Briefly, here are a list of the components and features that are limited or will not work.
- Lazy - the 'Lazy' type does not exist on windows phone.
- StronglyTypedMetaData - is also removed because the implementation uses classes from System.ComponentModel.Composition which is currently unavailable on windows phone.
- Open generics - Support for open generics is fairly weak / not supported currently on WP7. Thus you may find situations where it is impossible for Autofac to perform the Resolve. See some of my notes here.
- Checking constraints in open generic arguments - again, not supported, can cause failures in some complex situations.
The binaries can be added to your project straight from Nuget under Autofac.WP7.