Skip to content

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

feat(domain): remove Program class and set project type to a class lib

Lars6f200a7e620d
diff --git a/LarsWM.Domain/LarsWM.Domain.csproj b/LarsWM.Domain/LarsWM.Domain.csproj
index d04e0d42..d85de27f 100644
--- a/LarsWM.Domain/LarsWM.Domain.csproj
+++ b/LarsWM.Domain/LarsWM.Domain.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
- <OutputType>WinExe</OutputType>
+ <OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon />
diff --git a/LarsWM.Domain/Program.cs b/LarsWM.Domain/Program.cs
deleted file mode 100644
index 8809fc42..00000000
--- a/LarsWM.Domain/Program.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using LarsWM.Domain.Common.Services;
-using LarsWM.Domain.Monitors;
-using LarsWM.Domain.Monitors.CommandHandlers;
-using LarsWM.Domain.Monitors.EventHandler;
-using LarsWM.Domain.UserConfigs;
-using LarsWM.Domain.UserConfigs.CommandHandlers;
-using LarsWM.Domain.Windows;
-using LarsWM.Domain.Workspaces;
-using LarsWM.Domain.Workspaces.CommandHandlers;
-using Microsoft.Extensions.DependencyInjection;
-using System;
-using System.Diagnostics;
-
-namespace LarsWM.Domain
-{
- class Program
- {
- public static IServiceProvider ServiceProvider { get; private set; }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Debug.WriteLine("Application started");
-
- var serviceCollection = CreateServiceCollection();
-
- ServiceProvider = serviceCollection.BuildServiceProvider();
-
- var bus = ServiceProvider.GetRequiredService<IBus>();
- bus.RegisterCommandHandler<AddMonitorHandler>();
- bus.RegisterCommandHandler<ReadUserConfigHandler>();
- bus.RegisterCommandHandler<CreateWorkspaceHandler>();
- bus.RegisterEventHandler<MonitorAddedHandler>();
-
- var startup = ServiceProvider.GetRequiredService<Startup>();
- startup.Init();
- }
-
- private static ServiceCollection CreateServiceCollection()
- {
- var serviceCollection = new ServiceCollection();
-
- serviceCollection.AddSingleton<IBus, Bus>();
- serviceCollection.AddSingleton<KeybindingService>();
- serviceCollection.AddSingleton<MonitorService>();
- serviceCollection.AddSingleton<UserConfigService>();
- serviceCollection.AddSingleton<WindowService>();
- serviceCollection.AddSingleton<WorkspaceService>();
- serviceCollection.AddSingleton<AddMonitorHandler>();
- serviceCollection.AddSingleton<MonitorAddedHandler>();
- serviceCollection.AddSingleton<ReadUserConfigHandler>();
- serviceCollection.AddSingleton<CreateWorkspaceHandler>();
- serviceCollection.AddSingleton<Startup>();
-
- return serviceCollection;
- }
- }
-}