private void WaitForPrompt(ShellStream stream, bool timeOut)
{
if (_verbose)
{
if (timeOut)
{
stream.Expect(TimeSpan.FromSeconds(5), new Renci.SshNet.ExpectAction("#",
(output) =>
{
if (_console != null)
_console.Log.Write(output);
}));
}
else
{
stream.Expect(new Renci.SshNet.ExpectAction("#",
(output) =>
{
if (_console != null)
_console.Log.Write(output);
}));
}
}
else
{
if (timeOut)
stream.Expect("#", TimeSpan.FromSeconds(5));
else
stream.Expect("#");
}
}