private static void WaitForStopCommand(ITempDB instance) { var shell = new InteractiveShell(WriteLine); shell.RegisterCommand( "stop", cmd => { Console.WriteLine("Shutting down..."); instance?.Dispose(); shell.Dispose(); }); }
private static InteractiveShell WaitForStopCommand() { var shell = new InteractiveShell(WriteLine); shell.RegisterCommand( "stop", cmd => { Console.WriteLine("Shutting down..."); DestroyInstance(); shell.Dispose(); }); return(shell); }