protected override void OnStart(string[] args) { thread = new Thread(() => { ServerResourceMonitor.ServerResource.Start(); WeatherService.Start(); InformationService.Start(); LinkServiceValidate.Start(); }); thread.IsBackground = true; thread.Start(); }
static void Main(string[] args) { try { ServerResource.Start(); WeatherService.Start(); InformationService.Start(); LinkServiceValidate.Start(); Console.WriteLine("完成"); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.ReadKey(); }