public MonitorThread(RegistryCenter regCenter) { m_RegistryCenter = regCenter; m_MonitorThread = new Thread(x => { DoWork(); }); }
protected override void OnStart(string[] args) { XTrace.WriteLine("注册中心服务启动。"); try { RegistryCenter registryCenter = new RegistryCenter(); } catch (Exception ex) { XTrace.WriteLine("注册中心服务启动失败:" + ex.ToString()); } }
/// <summary> /// The main entry point for the application. /// </summary> static void Main() { /*ServiceBase[] ServicesToRun; * ServicesToRun = new ServiceBase[] * { * new RegistryService() * }; * ServiceBase.Run(ServicesToRun);*/ XTrace.WriteLine("注册中心服务启动。"); try { RegistryCenter registryCenter = new RegistryCenter(); registryCenter.Start(); Console.ReadKey(); } catch (Exception ex) { XTrace.WriteLine("注册中心服务启动失败:" + ex.ToString()); } }
/// <summary> /// The main entry point for the application. /// </summary> static void Main() { /*ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new RegistryService() }; ServiceBase.Run(ServicesToRun);*/ XTrace.WriteLine("注册中心服务启动。"); try { RegistryCenter registryCenter = new RegistryCenter(); registryCenter.Start(); Console.ReadKey(); } catch (Exception ex) { XTrace.WriteLine("注册中心服务启动失败:" + ex.ToString()); } }
/// <summary> /// 构造函数 /// </summary> /// <param name="regCenter">注册中心</param> public MessageProcessor(RegistryCenter regCenter) { m_RegistryCenter = regCenter; }
public MessageProcessor(RegistryCenter regCenter) { m_RegistryCenter = regCenter; }