mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
29 lines
776 B
C#
29 lines
776 B
C#
using Govor.ConsoleClient.Services;
|
|
using Govor.ConsoleClient.Services.Interfaces;
|
|
|
|
namespace Govor.ConsoleClient;
|
|
|
|
public class App
|
|
{
|
|
private readonly IInputPipeline _inputPipeline;
|
|
private readonly ILogger _logger;
|
|
|
|
public App(IInputPipeline inputPipeline, ILogger logger)
|
|
{
|
|
_logger = logger;
|
|
_inputPipeline = inputPipeline;
|
|
}
|
|
|
|
public async Task RunAsync()
|
|
{
|
|
_logger.Title("Добро пожаловать в консольный клиент Говор!");
|
|
while (true)
|
|
{
|
|
Console.Write(">> ");
|
|
var input = Console.ReadLine();
|
|
if (input == null || input.Trim().ToLower() == "exit") break;
|
|
await _inputPipeline.ProcessInputAsync(input);
|
|
}
|
|
}
|
|
}
|