May
30th,
2014
Castle Windsor has a great add on called the WCF Integration Facility which allows you to get all of the benefits of DI/IoC when working with WCF services.
The only downside of using it is the verbosity of the component registration. Thankfully we are able to use extension methods to help us here and hide away all of the verbose registration code behind a simple, chainable method call.
Register a WCF Service
Using an extension method, you can register a WCF service very simply and easily.
Register a WCF Client
WCF client registration also becomes very simple as well.
The extension methods
These extension methods also return the IWindsorContainer
intance allowing multiple registrations to be chained in a fluent manner.