public void InitServiceTest() { new Thread(() => { while (true) { var pid = "0"; try { pid = HttpRequestUtil.GetHttpResponse("http://localhost:8081/pid", 3000); } catch (Exception e) { } var p = Convert.ToInt64(pid); if (p > 0) { CmdUtils.RunCmdStandard("taskkill /f /pid " + p); break; } else { Thread.Sleep(3000); } } }).Start(); IRpcService rpc = new RpcServiceImpl(); rpc.ReCreateJMapQuery(); rpc.InitService(); }
public void RegistServiceTest() { IRpcService rpcService = new RpcServiceImpl(); WaitCallback callback = rpcService.InitService; var ss = ServiceManager.RegistService(callback, null); ServiceManager.ExecuteService(ss.Id); }