static void Main(string[] args) { var container = new UnityContainer(); ConfigureContainer(container); var host = new UnityServiceHost(container, typeof(DeployService)); host.Open(); Alert(host); Console.ReadLine(); }
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { var sh = new UnityServiceHost(_rootContainer, serviceType, baseAddresses); sh.Faulted += (s, e) => { Log.DebugFormat("Faulted connection: {0}", e); }; sh.UnknownMessageReceived += (s, e) => { Log.ErrorFormat("Unknown message received: {0}", e.Message); }; return sh; }