Unity 1.1 Container Behavior for WCF
Some time ago I needed a way to wire up an IoC container in a WCF service I was creating at that time. Since I’ve used ObjectBuilder-based containers a lot in both Composite UI Application Block and Enterprise Library, I wanted to take a closer look at the Unity container and the 2.0 version of ObjectBuilder.
To manage the creation of service instances, you have to implement the IInstanceProvider interface, and wire up the concrete type in a service behavior.
The code should be fairly documented, and a simple xUnit.NET test project is included. If you want to check out xUnit.NET, check out its CodePlex site.