I can't seem to get these 3 working together.
I narrowed it down to a very simple service with 1 method:
[System.ServiceModel.ServiceContract]
public interface Icontract
{
[System.ServiceModel.OperationContract]
void Ping();
}
public class contract : Icontract
{
public void Ping()
{ }
}
I have a factory that looks like this:
public class ServiceFactory
{
private readonly IKernel _kernel;
public ServiceFactory(IKernel kernel)
{
_kernel = kernel;
}
public NinjectServiceHost<T> GetService<T>()
{
return _kernel.Get<NinjectServiceHost<T>>();
}
}
If I create the service like so...
_tmp = new ServiceHost(typeof(ConsoleApplication1.contract));
_tmp.Open();
...Discovery works just fine. However if I use the factory like so...
_tmp = _factory.GetService<ConsoleApplication1.contract>();
_tmp.Open();
...the service isn't discoverable anymore. Everything else about the service works as expected.
Anyone had any joy getting Discovery working this way, or is there something I'm doing wrong?