Пример #1
0
        private static void WaitForStopCommand(ITempDB instance)
        {
            var shell = new InteractiveShell(WriteLine);

            shell.RegisterCommand(
                "stop",
                cmd =>
            {
                Console.WriteLine("Shutting down...");
                instance?.Dispose();
                shell.Dispose();
            });
        }
Пример #2
0
        private static InteractiveShell WaitForStopCommand()
        {
            var shell = new InteractiveShell(WriteLine);

            shell.RegisterCommand(
                "stop",
                cmd =>
            {
                Console.WriteLine("Shutting down...");
                DestroyInstance();
                shell.Dispose();
            });
            return(shell);
        }