Skip to content

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

feat(boot): create service provider and register necessary services

Larsfcc9326fe5b0
diff --git a/LarsWM.Bootstrapper/Program.cs b/LarsWM.Bootstrapper/Program.cs
index 55367bf0..e9df601d 100644
--- a/LarsWM.Bootstrapper/Program.cs
+++ b/LarsWM.Bootstrapper/Program.cs
@@ -1,5 +1,10 @@
+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;
@@ -14,10 +19,15 @@ namespace LarsWM.Bootstrapper
[STAThread]
static void Main()
{
- Application.SetHighDpiMode(HighDpiMode.SystemAware);
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
+ Debug.WriteLine("Application started");
+
+ var serviceCollection = new ServiceCollection();
+ serviceCollection.AddInfrastructureServices();
+ serviceCollection.AddDomainServices();
+
+ ServiceLocator.Provider = serviceCollection.BuildServiceProvider();
+
+ ServiceLocator.Provider.RegisterDomainHandlers();
}
}
}