Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            AdhesiveFramework.Start();
            var host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>();

            host.Open();
            Console.WriteLine("Adhesive.DistributedService.Config.ConsoleHost started...");
            Console.ReadLine();
            host.Close();
            AdhesiveFramework.End();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            AdhesiveFramework.Start();
            var host = WcfServiceHostFactory.CreateServiceHost <FuckService>();

            host.Open();
            Console.WriteLine("FuckService started...");
            Console.ReadLine();
            host.Close();
            AdhesiveFramework.End();
        }
Ejemplo n.º 3
0
 protected override void OnStart(string[] args)
 {
     try
     {
         AdhesiveFramework.Start();
         host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>();
         host.Open();
     }
     catch (Exception ex)
     {
         LocalLoggingService.Error("Windows服务启动的时候出错,信息为 {0}", ex.ToString());
         Environment.Exit(0);
     }
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            WcfLogServer.Start();
            try
            {
                using (var host = WcfServiceHostFactory.CreateServiceHost <WcfLogService>())
                {
                    host.Open();
                    Console.WriteLine("Log service started");
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();

            WcfLogServer.End();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            ConfigUpdateManager.InitHeart();

            try
            {
                using (var host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>())
                {
                    host.Open();
                    Console.WriteLine("Config service started");
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();
        }
Ejemplo n.º 6
0
 private static void StartService()
 {
     host = WcfServiceHostFactory.CreateServiceHost <Service>();
     host.Open();
 }