I have console host application. In here I use IoC container as provider of instance, and want to pass contract interface into ServiceHost constructor. Obviously, it says I can't do it with interfaces.
Why do ServiceHost even need it? I attach custom provider if he want to instantiate it! Even more, I don't want to pass instances into it - it should be by demand.
How to make ServiceHost only from interface (keep in mind all neccessary bindings already in IoC)?
Example:
var host = new ServiceHost(typeof(IMyContract), address);
So, basicaly, by specifying InstanceProvider you should aquire this behavior. But Microsoft forcefuly ask for concrete implementation type, even if I provided instance factory and may not have concrete implementation type!