Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat(boot): register Startup with DI container

Lars7df0fbd101ad
diff --git a/LarsWM.Bootstrapper/Program.cs b/LarsWM.Bootstrapper/Program.cs
index e9df601d..ba6a5117 100644
--- a/LarsWM.Bootstrapper/Program.cs
+++ b/LarsWM.Bootstrapper/Program.cs
@@ -1,13 +1,8 @@
using LarsWM.Domain;
using LarsWM.Infrastructure;
-using LarsWM.Infrastructure.Bussing;
using Microsoft.Extensions.DependencyInjection;
using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
namespace LarsWM.Bootstrapper
{
@@ -24,10 +19,14 @@ namespace LarsWM.Bootstrapper
var serviceCollection = new ServiceCollection();
serviceCollection.AddInfrastructureServices();
serviceCollection.AddDomainServices();
+ serviceCollection.AddSingleton<Startup>();
ServiceLocator.Provider = serviceCollection.BuildServiceProvider();
ServiceLocator.Provider.RegisterDomainHandlers();
+
+ var startup = ServiceLocator.Provider.GetRequiredService<Startup>();
+ startup.Init();
}
}
}