static void Main(string[] args) { ApplicationBoot.Start(); Console.WriteLine("服务器已启动"); var result = Console.ReadLine(); if (result.ToLower() == "q") { ApplicationBoot.Stop(); Console.WriteLine("服务器已关闭"); } Console.ReadLine(); }
protected override void OnStop() { ApplicationBoot.Stop(); }