Files
Govor/Govor.ConsoleClient/App.cs
T
Artemy f524a9f0b7 Refactor console client to new Govor.ConsoleClient project
Removed Govor.Console implementation and introduced a new Govor.ConsoleClient project with a modular command-based architecture. Added dependency injection, command dispatcher, middleware pipeline, logging, and interactive command support. Updated solution and project files to reflect the new structure.
2025-07-19 19:08:21 +07:00

28 lines
727 B
C#

using Govor.ConsoleClient.Services;
namespace Govor.ConsoleClient;
public class App
{
private readonly InputPipeline _inputPipeline;
private readonly ILogger _logger;
public App(InputPipeline 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);
}
}
}