Add support for alternate screen buffers

Closes #250
This commit is contained in:
Patrik Svensson
2021-11-30 13:15:17 +01:00
committed by Phil Scott
parent 2e5d18fa78
commit fd4b96944e
17 changed files with 245 additions and 11 deletions

View File

@ -10,7 +10,7 @@ namespace Spectre.Console.Testing
return func();
}
public async Task<T> Run<T>(Func<Task<T>> func)
public async Task<T> RunAsync<T>(Func<Task<T>> func)
{
return await func().ConfigureAwait(false);
}

View File

@ -66,6 +66,12 @@ namespace Spectre.Console.Testing
_input.Enqueue(new ConsoleKeyInfo((char)input, input, false, false, false));
}
/// <inheritdoc/>
public bool IsKeyAvailable()
{
return _input.Count > 0;
}
/// <inheritdoc/>
public ConsoleKeyInfo? ReadKey(bool intercept)
{