You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
862 B
C#
28 lines
862 B
C#
using CommanderApp.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace CommanderApp;
|
|
|
|
public partial class App : Application
|
|
{
|
|
public App()
|
|
{
|
|
InitializeComponent();
|
|
|
|
var services = new ServiceCollection();
|
|
ConfigureServices(services);
|
|
var serviceProvider = services.BuildServiceProvider();
|
|
|
|
MainPage = serviceProvider.GetService<MainPage>();
|
|
}
|
|
|
|
private void ConfigureServices(ServiceCollection services)
|
|
{
|
|
services.AddSingleton<IFileSystemService, FileSystemService>();
|
|
services.AddSingleton<IPanelManager, PanelManager>();
|
|
services.AddSingleton<IFileOperations, FileOperations>();
|
|
services.AddSingleton<IKeyboardService, KeyboardService>();
|
|
services.AddSingleton<IPathHelper, PathHelper>();
|
|
services.AddSingleton<MainPage>();
|
|
}
|
|
} |