mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-06 04:28:15 +08:00

committed by
Phil Scott

parent
2e5d18fa78
commit
fd4b96944e
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user