Ejemplo n.º 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();
            });
        }
Ejemplo n.º 2
0
        private static InteractiveShell WaitForStopCommand()
        {
            var shell = new InteractiveShell(WriteLine);

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