Initial commit: Nix WSL Wrapper project with DDD, Clean Code, and tests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user