Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

UnityServiceBehavior updated to support named resolutions

I previously posted about how to get Unity support in WCF services via a ServiceBehavior. I found a glaring omission in this implementation when preparing for my .Net Users Group presentation. The existing code supports named configuration sections and named containers. Unfortunately it left out the more common named instance resolutions.

I have checked in a new code version that supports this. See UnityServiceElement, UnityServiceBehavior and UnityInstanceProvider for the updated code line.

Written on July 12, 2010