mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Add ReadKey to IConsole (#111)
Co-authored-by: Alexey Golub <tyrrrrrr@gmail.com>
This commit is contained in:
@@ -90,6 +90,11 @@ namespace CliFx.Infrastructure
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ReadKey(bool intercept = false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void Dispose() => _cancellationTokenSource.Dispose();
|
||||
}
|
||||
|
||||
@@ -87,6 +87,11 @@ namespace CliFx.Infrastructure
|
||||
/// Clears the console buffer and corresponding console window of display information.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Obtains the next character or function key pressed by the user.
|
||||
/// </summary>
|
||||
void ReadKey(bool intercept = false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -93,6 +93,9 @@ namespace CliFx.Infrastructure
|
||||
/// <inheritdoc />
|
||||
public void Clear() => Console.Clear();
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ReadKey(bool intercept = false) => Console.ReadKey(intercept);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user