Terminal UI V2, advanced binding
This commit is contained in:
@@ -6,6 +6,7 @@ using FileTime.Core.Interactions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using TerminalUI;
|
||||
using TerminalUI.ConsoleDrivers;
|
||||
|
||||
namespace FileTime.ConsoleUI.App;
|
||||
|
||||
@@ -19,9 +20,16 @@ public static class Startup
|
||||
services.TryAddSingleton<IAppState>(sp => sp.GetRequiredService<IConsoleAppState>());
|
||||
services.TryAddSingleton<IUserCommunicationService, ConsoleUserCommunicationService>();
|
||||
services.TryAddSingleton<IKeyInputHandlerService, KeyInputHandlerService>();
|
||||
services.TryAddSingleton<IAppKeyService<ConsoleKey>, ConsoleAppKeyService>();
|
||||
services.TryAddSingleton<ISystemClipboardService, ConsoleSystemClipboardService>();
|
||||
services.AddSingleton<CustomLoggerSink>();
|
||||
|
||||
services.TryAddSingleton<IApplicationContext, ApplicationContext>();
|
||||
services.TryAddSingleton<IApplicationContext>(sp
|
||||
=> new ApplicationContext
|
||||
{
|
||||
ConsoleDriver = sp.GetRequiredService<IConsoleDriver>()
|
||||
}
|
||||
);
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user