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(); }
static void Main(string[] args) { AdhesiveFramework.Start(); var host = WcfServiceHostFactory.CreateServiceHost <FuckService>(); host.Open(); Console.WriteLine("FuckService started..."); Console.ReadLine(); host.Close(); AdhesiveFramework.End(); }
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); } }
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(); }
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(); }
private static void StartService() { host = WcfServiceHostFactory.CreateServiceHost <Service>(); host.Open(); }