Esempio n. 1
0
        static void StopService(SimpleInjectorServiceHost host, string serviceDescription)
        {
            host.Close();
            Console.WriteLine($"Service { serviceDescription } stopped");


            Console.WriteLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var container = IocContainer.Init();

            SM.ServiceHost hostService = new SimpleInjectorServiceHost(container, typeof(Service1));
            hostService.Open();

            System.Console.ReadLine();

            hostService.Close();
        }
        static void Main(string[] args)
        {
            var container = InitializeContainer();

            //reserve url: netsh http add urlacl url = http://+:8086/ user="******"
            ServiceHost serviceHost = new SimpleInjectorServiceHost(container, typeof(ScreenManager));

            serviceHost.Open();

            ServiceHost serviceHostProfile = new SimpleInjectorServiceHost(container, typeof(ProfileManager));

            serviceHostProfile.Open();

            Console.WriteLine("Services started. Press [Enter] to exit.");
            Console.ReadLine();

            serviceHost.Close();
            serviceHostProfile.Close();
        }
Esempio n. 4
0
 private static void CloseServices()
 {
     _host.Close();
 }