From cd9dbe6f2437c31be8e5f05b66f1817b6cb1a8f0 Mon Sep 17 00:00:00 2001 From: Lars Berger Date: Tue, 1 Aug 2023 05:59:13 +0800 Subject: [PATCH] refactor: move ipc message interfaces to `Domain/Common` --- GlazeWM.Application.IpcServer/IpcMessageHandler.cs | 2 +- GlazeWM.Application.IpcServer/IpcServerManager.cs | 1 - GlazeWM.Application/Program.cs | 2 +- .../Common/IpcMessages}/GetContainersMessage.cs | 2 +- .../Common/IpcMessages}/GetMonitorsMessage.cs | 2 +- .../Common/IpcMessages}/GetWindowsMessage.cs | 2 +- .../Common/IpcMessages}/GetWorkspacesMessage.cs | 2 +- .../Common/IpcMessages}/InvokeCommandMessage.cs | 2 +- .../Common/IpcMessages}/SubscribeMessage.cs | 2 +- 9 files changed, 8 insertions(+), 9 deletions(-) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/GetContainersMessage.cs (79%) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/GetMonitorsMessage.cs (70%) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/GetWindowsMessage.cs (70%) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/GetWorkspacesMessage.cs (71%) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/InvokeCommandMessage.cs (91%) rename {GlazeWM.Application.IpcServer/Messages => GlazeWM.Domain/Common/IpcMessages}/SubscribeMessage.cs (87%) diff --git a/GlazeWM.Application.IpcServer/IpcMessageHandler.cs b/GlazeWM.Application.IpcServer/IpcMessageHandler.cs index f2c48611c..b22618961 100644 --- a/GlazeWM.Application.IpcServer/IpcMessageHandler.cs +++ b/GlazeWM.Application.IpcServer/IpcMessageHandler.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.Text.Json; using CommandLine; -using GlazeWM.Application.IpcServer.Messages; using GlazeWM.Application.IpcServer.Server; +using GlazeWM.Domain.Common.IpcMessages; using GlazeWM.Domain.Containers; using GlazeWM.Domain.Monitors; using GlazeWM.Domain.UserConfigs; diff --git a/GlazeWM.Application.IpcServer/IpcServerManager.cs b/GlazeWM.Application.IpcServer/IpcServerManager.cs index 7dc951557..f88d22330 100644 --- a/GlazeWM.Application.IpcServer/IpcServerManager.cs +++ b/GlazeWM.Application.IpcServer/IpcServerManager.cs @@ -5,7 +5,6 @@ using GlazeWM.Application.IpcServer.Server; using GlazeWM.Infrastructure.Bussing; using Microsoft.Extensions.Logging; -using NetCoreServer; namespace GlazeWM.Application.IpcServer { diff --git a/GlazeWM.Application/Program.cs b/GlazeWM.Application/Program.cs index 73aaab341..e7e88bfd9 100644 --- a/GlazeWM.Application/Program.cs +++ b/GlazeWM.Application/Program.cs @@ -5,11 +5,11 @@ using CommandLine; using GlazeWM.Application.CLI; using GlazeWM.Application.IpcServer; -using GlazeWM.Application.IpcServer.Messages; using GlazeWM.Application.WM; using GlazeWM.Bar; using GlazeWM.Domain; using GlazeWM.Domain.Common; +using GlazeWM.Domain.Common.IpcMessages; using GlazeWM.Domain.Containers; using GlazeWM.Infrastructure; using GlazeWM.Infrastructure.Bussing; diff --git a/GlazeWM.Application.IpcServer/Messages/GetContainersMessage.cs b/GlazeWM.Domain/Common/IpcMessages/GetContainersMessage.cs similarity index 79% rename from GlazeWM.Application.IpcServer/Messages/GetContainersMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/GetContainersMessage.cs index b5bef0121..bbb69985b 100644 --- a/GlazeWM.Application.IpcServer/Messages/GetContainersMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/GetContainersMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb( "containers", diff --git a/GlazeWM.Application.IpcServer/Messages/GetMonitorsMessage.cs b/GlazeWM.Domain/Common/IpcMessages/GetMonitorsMessage.cs similarity index 70% rename from GlazeWM.Application.IpcServer/Messages/GetMonitorsMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/GetMonitorsMessage.cs index d2c274e12..707a9e3c0 100644 --- a/GlazeWM.Application.IpcServer/Messages/GetMonitorsMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/GetMonitorsMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb("monitors", HelpText = "Get all monitors.")] public class GetMonitorsMessage diff --git a/GlazeWM.Application.IpcServer/Messages/GetWindowsMessage.cs b/GlazeWM.Domain/Common/IpcMessages/GetWindowsMessage.cs similarity index 70% rename from GlazeWM.Application.IpcServer/Messages/GetWindowsMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/GetWindowsMessage.cs index 486160325..22d57c679 100644 --- a/GlazeWM.Application.IpcServer/Messages/GetWindowsMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/GetWindowsMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb("windows", HelpText = "Get all windows.")] public class GetWindowsMessage diff --git a/GlazeWM.Application.IpcServer/Messages/GetWorkspacesMessage.cs b/GlazeWM.Domain/Common/IpcMessages/GetWorkspacesMessage.cs similarity index 71% rename from GlazeWM.Application.IpcServer/Messages/GetWorkspacesMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/GetWorkspacesMessage.cs index e8209bca2..72a0fc839 100644 --- a/GlazeWM.Application.IpcServer/Messages/GetWorkspacesMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/GetWorkspacesMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb("workspaces", HelpText = "Get all workspaces.")] public class GetWorkspacesMessage diff --git a/GlazeWM.Application.IpcServer/Messages/InvokeCommandMessage.cs b/GlazeWM.Domain/Common/IpcMessages/InvokeCommandMessage.cs similarity index 91% rename from GlazeWM.Application.IpcServer/Messages/InvokeCommandMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/InvokeCommandMessage.cs index c6a866a9e..7252dc9ea 100644 --- a/GlazeWM.Application.IpcServer/Messages/InvokeCommandMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/InvokeCommandMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb( "command", diff --git a/GlazeWM.Application.IpcServer/Messages/SubscribeMessage.cs b/GlazeWM.Domain/Common/IpcMessages/SubscribeMessage.cs similarity index 87% rename from GlazeWM.Application.IpcServer/Messages/SubscribeMessage.cs rename to GlazeWM.Domain/Common/IpcMessages/SubscribeMessage.cs index 05b92a49f..1e815c52e 100644 --- a/GlazeWM.Application.IpcServer/Messages/SubscribeMessage.cs +++ b/GlazeWM.Domain/Common/IpcMessages/SubscribeMessage.cs @@ -1,6 +1,6 @@ using CommandLine; -namespace GlazeWM.Application.IpcServer.Messages +namespace GlazeWM.Domain.Common.IpcMessages { [Verb( "commit",