Making the HttpMessageHandlerFactory in WCF Web Apis more DI friendly
Posted by: Pablo M. Cibraro (aka Cibrax),
on 07 May 2011 |
View original | Bookmarked: 0 time(s)
The HttpMessageHandlerFactory shipped out of the box in the WCF Web Apis Preview 4 can only construct channels instances with a single argument in the constructor representing the inner channel in the pipeline. public abstract class DelegatingChannel : HttpMessageChannel
{
protected DelegatingChannel(HttpMessageChannel innerChannel);
This is the constructor that the factory always try to invoke by default. However, this approach does not work well when you need to inject...