Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var container = new UnityContainer();
            ConfigureContainer(container);

            var host = new UnityServiceHost(container, typeof(DeployService));

            host.Open();
            Alert(host);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 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;
 }