mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
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.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user