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

committed by
Phil Scott

parent
884cb8ddd4
commit
5f97f2300c
@ -12,7 +12,7 @@ namespace Spectre.Console.Testing
|
||||
|
||||
public async Task<T> Run<T>(Func<Task<T>> func)
|
||||
{
|
||||
return await func();
|
||||
return await func().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Spectre.Console.Testing
|
||||
{
|
||||
@ -74,5 +76,11 @@ namespace Spectre.Console.Testing
|
||||
|
||||
return _input.Dequeue();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
|
||||
{
|
||||
return Task.FromResult(ReadKey(intercept));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user