* Fix dotnet-dump analyze <dump-path> -c exit
The exit command would fail to exit the analyze process when
executed from the command line.
* Move fix to ConsoleProvider per feedback, simplify
{
m_history = new List<StringBuilder>();
m_activeLine = new StringBuilder();
+ m_shutdown = false;
m_consoleConverter = new CharToLineConverter(text => {
NewOutput(text);
public async Task Start(Func<string, CancellationToken, Task> dispatchCommand)
{
m_lastCommandLine = null;
- m_shutdown = false;
m_interactiveConsole = !Console.IsInputRedirected;
RefreshLine();
}
}
+ public bool Shutdown { get { return m_shutdown; } }
+
/// <summary>
/// Stop input processing/dispatching
/// </summary>
foreach (string cmd in command)
{
await _commandProcessor.Parse(cmd);
+
+ if (_consoleProvider.Shutdown)
+ break;
}
}