public THost CreateHost <THost>(Type serviceType) where THost : ServiceHost { Trace.WriteLine($"Creating host for '{serviceType}'"); var config = _configuration.GetServiceConfiguration(serviceType); var host = (THost)HostConstructor(serviceType, config); Configure <THost>(host, serviceType, config); return(host); }