Exemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            BatchCoreTest srv = new BatchCoreTest();

            ConsoleUtil.RegisterCloseConsoleHandle();//注册控制台关闭事件,注意,只有执行该该操作,事件
            ConsoleUtil.ClosedConsole += (sender, e) => srv.Dispose();
            Console.ReadLine();
        }
Exemplo n.º 2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            BatchCoreTest srv = new BatchCoreTest();

            Console.ReadLine();
        }