Initial commit: Nix WSL Wrapper project with DDD, Clean Code, and tests

This commit is contained in:
Marek Novák
2026-07-01 02:04:43 +02:00
commit 161eb7d387
22 changed files with 932 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using NixWslWrapper.Core.Interfaces;
using NixWslWrapper.Infrastructure.IO;
using NixWslWrapper.Infrastructure.Executors;
namespace NixWslWrapper.Cli
{
internal class Program
{
private static int Main(string[] args)
{
var serviceProvider = ConfigureServices();
var controller = serviceProvider.GetRequiredService<CliController>();
return controller.Run(args);
}
private static IServiceProvider ConfigureServices()
{
return new ServiceCollection()
.AddSingleton<IStreamCopier, ThreadedStreamCopier>()
.AddSingleton<ICommandExecutor, WslCommandExecutor>()
.AddSingleton<CliController>()
.BuildServiceProvider();
}
}
}