Newsbot.Cli/Newsbot.Services/Terminal/UserInputService.cs

18 lines
414 B
C#

namespace jtom38.Newsbot.Services.Terminal;
public class UserInputService
{
public UserInputService()
{
}
public static async Task<string> WaitForInput(string message)
{
await Task.Delay(1);
Console.WriteLine(message);
Console.WriteLine("Enter your selection or press 'q' to exit");
var input = Console.ReadLine();
return input ?? "";
}
}