From fe65520941bab5c5e7053f94f58a692e1f65a6b2 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 31 Jan 2023 14:10:36 +0100 Subject: [PATCH] chore: put Tcp, NamedPipes and LocalData assemblies into other assemblies to reduce number of unnecessary projects --- NosSmooth.Comms.sln | 21 ------ .../Extensions/ServiceCollectionExtensions.cs | 75 +++++++++++++++++++ .../NamedPipes}/NamedPipeClient.cs | 2 +- .../NamedPipes}/NamedPipeServer.cs | 3 +- .../Tcp}/TcpClient.cs | 2 +- .../Tcp}/TcpServer.cs | 2 +- .../Extensions/ServiceCollectionExtensions.cs | 41 ---------- .../NosSmooth.Comms.NamedPipes.csproj | 13 ---- .../Extensions/ServiceCollectionExtensions.cs | 65 ---------------- .../NosSmooth.Comms.Tcp.csproj | 13 ---- src/Local/NosSmooth.Comms.Inject/DllMain.cs | 2 - .../MessageResponders/FocusResponder.cs | 2 +- .../MessageResponders/FollowResponder.cs | 2 +- .../Messages}/FocusMessage.cs | 2 +- .../Messages}/FollowMessage.cs | 2 +- .../NosSmooth.Comms.Inject.csproj | 2 - .../NosSmooth.Comms.Local/CommsInjector.cs | 2 +- .../NosSmooth.Comms.Local.csproj | 2 +- .../NosSmooth.Comms.LocalData.csproj | 9 --- .../ConsolePacketLogger.csproj | 5 +- 20 files changed, 86 insertions(+), 181 deletions(-) rename src/Core/{NosSmooth.Comms.NamedPipes => NosSmooth.Comms.Core/NamedPipes}/NamedPipeClient.cs (97%) rename src/Core/{NosSmooth.Comms.NamedPipes => NosSmooth.Comms.Core/NamedPipes}/NamedPipeServer.cs (98%) rename src/Core/{NosSmooth.Comms.Tcp => NosSmooth.Comms.Core/Tcp}/TcpClient.cs (97%) rename src/Core/{NosSmooth.Comms.Tcp => NosSmooth.Comms.Core/Tcp}/TcpServer.cs (98%) delete mode 100644 src/Core/NosSmooth.Comms.NamedPipes/Extensions/ServiceCollectionExtensions.cs delete mode 100644 src/Core/NosSmooth.Comms.NamedPipes/NosSmooth.Comms.NamedPipes.csproj delete mode 100644 src/Core/NosSmooth.Comms.Tcp/Extensions/ServiceCollectionExtensions.cs delete mode 100644 src/Core/NosSmooth.Comms.Tcp/NosSmooth.Comms.Tcp.csproj rename src/Local/{NosSmooth.Comms.LocalData => NosSmooth.Comms.Inject/Messages}/FocusMessage.cs (84%) rename src/Local/{NosSmooth.Comms.LocalData => NosSmooth.Comms.Inject/Messages}/FollowMessage.cs (84%) delete mode 100644 src/Local/NosSmooth.Comms.LocalData/NosSmooth.Comms.LocalData.csproj diff --git a/NosSmooth.Comms.sln b/NosSmooth.Comms.sln index cd42937f858febc95646bf1882a9b6976f2e9f6c..8534f626514b3e2c253b9c8010e4eeb8c9a2fdac 100644 --- a/NosSmooth.Comms.sln +++ b/NosSmooth.Comms.sln @@ -4,8 +4,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.Abstraction EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.Inject", "src\Local\NosSmooth.Comms.Inject\NosSmooth.Comms.Inject.csproj", "{7EFDE13A-1D42-44FE-A752-EBE6AC25E1DC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.NamedPipes", "src\Core\NosSmooth.Comms.NamedPipes\NosSmooth.Comms.NamedPipes.csproj", "{9621D790-97FC-4E01-BB0C-CA1F33B4C934}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.Local", "src\Local\NosSmooth.Comms.Local\NosSmooth.Comms.Local.csproj", "{A61B8A4F-EB81-41BC-8131-B45C0BCE0EA4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{EFE65101-4414-4966-813D-90FE3736F6B1}" @@ -16,12 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{711B EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsolePacketLogger", "src\Samples\ConsolePacketLogger\ConsolePacketLogger.csproj", "{A154A209-B86F-4180-B329-9B51F5FCD99F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.LocalData", "src\Local\NosSmooth.Comms.LocalData\NosSmooth.Comms.LocalData.csproj", "{8749D2C0-6253-4A88-BA38-55B7C10D074B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.Core", "src\Core\NosSmooth.Comms.Core\NosSmooth.Comms.Core.csproj", "{70275C91-1114-4673-8F9B-B0C311BFE337}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Comms.Tcp", "src\Core\NosSmooth.Comms.Tcp\NosSmooth.Comms.Tcp.csproj", "{04F43EA9-BC90-446F-8272-90705CAE9C27}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -36,10 +30,6 @@ Global {7EFDE13A-1D42-44FE-A752-EBE6AC25E1DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {7EFDE13A-1D42-44FE-A752-EBE6AC25E1DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {7EFDE13A-1D42-44FE-A752-EBE6AC25E1DC}.Release|Any CPU.Build.0 = Release|Any CPU - {9621D790-97FC-4E01-BB0C-CA1F33B4C934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9621D790-97FC-4E01-BB0C-CA1F33B4C934}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9621D790-97FC-4E01-BB0C-CA1F33B4C934}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9621D790-97FC-4E01-BB0C-CA1F33B4C934}.Release|Any CPU.Build.0 = Release|Any CPU {A61B8A4F-EB81-41BC-8131-B45C0BCE0EA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A61B8A4F-EB81-41BC-8131-B45C0BCE0EA4}.Debug|Any CPU.Build.0 = Debug|Any CPU {A61B8A4F-EB81-41BC-8131-B45C0BCE0EA4}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -48,27 +38,16 @@ Global {A154A209-B86F-4180-B329-9B51F5FCD99F}.Debug|Any CPU.Build.0 = Debug|Any CPU {A154A209-B86F-4180-B329-9B51F5FCD99F}.Release|Any CPU.ActiveCfg = Release|Any CPU {A154A209-B86F-4180-B329-9B51F5FCD99F}.Release|Any CPU.Build.0 = Release|Any CPU - {8749D2C0-6253-4A88-BA38-55B7C10D074B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8749D2C0-6253-4A88-BA38-55B7C10D074B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8749D2C0-6253-4A88-BA38-55B7C10D074B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8749D2C0-6253-4A88-BA38-55B7C10D074B}.Release|Any CPU.Build.0 = Release|Any CPU {70275C91-1114-4673-8F9B-B0C311BFE337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {70275C91-1114-4673-8F9B-B0C311BFE337}.Debug|Any CPU.Build.0 = Debug|Any CPU {70275C91-1114-4673-8F9B-B0C311BFE337}.Release|Any CPU.ActiveCfg = Release|Any CPU {70275C91-1114-4673-8F9B-B0C311BFE337}.Release|Any CPU.Build.0 = Release|Any CPU - {04F43EA9-BC90-446F-8272-90705CAE9C27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {04F43EA9-BC90-446F-8272-90705CAE9C27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04F43EA9-BC90-446F-8272-90705CAE9C27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {04F43EA9-BC90-446F-8272-90705CAE9C27}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {D3B6C5ED-9291-4215-8F8A-F3530849B896} = {EFE65101-4414-4966-813D-90FE3736F6B1} - {9621D790-97FC-4E01-BB0C-CA1F33B4C934} = {EFE65101-4414-4966-813D-90FE3736F6B1} {A61B8A4F-EB81-41BC-8131-B45C0BCE0EA4} = {1AD3F38F-67A8-472D-8AF3-875C6F93EC16} {7EFDE13A-1D42-44FE-A752-EBE6AC25E1DC} = {1AD3F38F-67A8-472D-8AF3-875C6F93EC16} {A154A209-B86F-4180-B329-9B51F5FCD99F} = {711B1BE4-9AE3-4A9D-A5F2-3434D057870E} - {8749D2C0-6253-4A88-BA38-55B7C10D074B} = {1AD3F38F-67A8-472D-8AF3-875C6F93EC16} {70275C91-1114-4673-8F9B-B0C311BFE337} = {EFE65101-4414-4966-813D-90FE3736F6B1} - {04F43EA9-BC90-446F-8272-90705CAE9C27} = {EFE65101-4414-4966-813D-90FE3736F6B1} EndGlobalSection EndGlobal diff --git a/src/Core/NosSmooth.Comms.Core/Extensions/ServiceCollectionExtensions.cs b/src/Core/NosSmooth.Comms.Core/Extensions/ServiceCollectionExtensions.cs index 32137d828bbca2e5662dc352139f1cd4e8c11ea8..e54d6492d6c0fd6a7bcd6eb4eb8cf0eeea628ffe 100644 --- a/src/Core/NosSmooth.Comms.Core/Extensions/ServiceCollectionExtensions.cs +++ b/src/Core/NosSmooth.Comms.Core/Extensions/ServiceCollectionExtensions.cs @@ -4,8 +4,11 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Net; using Microsoft.Extensions.DependencyInjection; +using NosSmooth.Comms.Core.NamedPipes; using NosSmooth.Comms.Core.Responders; +using NosSmooth.Comms.Core.Tcp; using NosSmooth.Comms.Data; using NosSmooth.Comms.Data.Responders; using NosSmooth.Core.Client; @@ -134,6 +137,78 @@ public static class ServiceCollectionExtensions return serviceCollection; } + /// + /// Adds a named pipe client as a . + /// + /// The service collection. + /// A function for resolving the name of the pipe using service provider. + /// The same service collection. + public static IServiceCollection AddNamedPipeClient + (this IServiceCollection serviceCollection, Func pipeNameResolver) + => serviceCollection + .AddSingleton(p => new NamedPipeClient(pipeNameResolver(p))) + .AddSingleton(p => p.GetRequiredService()); + + /// + /// Adds a named pipe server as a . + /// + /// The service collection. + /// A function for resolving the name of the pipe using service provider. + /// The same service collection. + public static IServiceCollection AddNamedPipeServer + (this IServiceCollection serviceCollection, Func pipeNameResolver) + => serviceCollection + .AddSingleton(p => new NamedPipeServer(pipeNameResolver(p))) + .AddSingleton(p => p.GetRequiredService()); + + /// + /// Adds tcp server as . + /// + /// The service collection. + /// A resovler used for resolving the ip and port to bind to. + /// The same service collection. + public static IServiceCollection AddTcpServer + ( + this IServiceCollection serviceCollection, + Func bindResolver + ) + { + return serviceCollection + .AddSingleton(p => p.GetRequiredService()) + .AddSingleton + ( + p => + { + var resolved = bindResolver(p); + return new TcpServer(resolved.BindAddress, resolved.Port); + } + ); + } + + /// + /// Adds tcp client as . + /// + /// The service collection. + /// A resovler used for resolving the hostname and port to connect to. + /// The same service collection. + public static IServiceCollection AddTcpClient + ( + this IServiceCollection serviceCollection, + Func connectionResolver + ) + { + return serviceCollection + .AddSingleton(p => p.GetRequiredService()) + .AddSingleton + ( + p => + { + var resolved = connectionResolver(p); + return new TcpClient(resolved.Hostname, resolved.Port); + } + ); + } + private static IServiceCollection AddInjecting(this IServiceCollection serviceCollection) => serviceCollection .AddScoped() diff --git a/src/Core/NosSmooth.Comms.NamedPipes/NamedPipeClient.cs b/src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeClient.cs similarity index 97% rename from src/Core/NosSmooth.Comms.NamedPipes/NamedPipeClient.cs rename to src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeClient.cs index d806ddf728293a0dc15bd8ee6b1ab106e84935ee..31f4a40c976c8b7a77145eba7b4620a15a79f171 100644 --- a/src/Core/NosSmooth.Comms.NamedPipes/NamedPipeClient.cs +++ b/src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeClient.cs @@ -9,7 +9,7 @@ using System.IO.Pipes; using NosSmooth.Comms.Data; using Remora.Results; -namespace NosSmooth.Comms.NamedPipes; +namespace NosSmooth.Comms.Core.NamedPipes; /// /// A client using named pipes. diff --git a/src/Core/NosSmooth.Comms.NamedPipes/NamedPipeServer.cs b/src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeServer.cs similarity index 98% rename from src/Core/NosSmooth.Comms.NamedPipes/NamedPipeServer.cs rename to src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeServer.cs index 62940b623086f9390b949b015e80f5bf7d2b7a6c..fa8a17bf7ba0d7ccbbee7f7ce98dba1b9b91d528 100644 --- a/src/Core/NosSmooth.Comms.NamedPipes/NamedPipeServer.cs +++ b/src/Core/NosSmooth.Comms.Core/NamedPipes/NamedPipeServer.cs @@ -6,11 +6,10 @@ using System.Data; using System.IO.Pipes; -using System.Xml; using NosSmooth.Comms.Data; using Remora.Results; -namespace NosSmooth.Comms.NamedPipes; +namespace NosSmooth.Comms.Core.NamedPipes; /// /// A server using named pipes. diff --git a/src/Core/NosSmooth.Comms.Tcp/TcpClient.cs b/src/Core/NosSmooth.Comms.Core/Tcp/TcpClient.cs similarity index 97% rename from src/Core/NosSmooth.Comms.Tcp/TcpClient.cs rename to src/Core/NosSmooth.Comms.Core/Tcp/TcpClient.cs index 3b47ebb16c1f083d9ad58bb467ea9857f08cccea..88a11aaf2451ff6b95357b6d3946ea37407e1a5f 100644 --- a/src/Core/NosSmooth.Comms.Tcp/TcpClient.cs +++ b/src/Core/NosSmooth.Comms.Core/Tcp/TcpClient.cs @@ -8,7 +8,7 @@ using System.Data; using NosSmooth.Comms.Data; using Remora.Results; -namespace NosSmooth.Comms.Tcp; +namespace NosSmooth.Comms.Core.Tcp; /// /// A client using tcp. diff --git a/src/Core/NosSmooth.Comms.Tcp/TcpServer.cs b/src/Core/NosSmooth.Comms.Core/Tcp/TcpServer.cs similarity index 98% rename from src/Core/NosSmooth.Comms.Tcp/TcpServer.cs rename to src/Core/NosSmooth.Comms.Core/Tcp/TcpServer.cs index b2b153e82539fb825dbf1873a5e157126da213b3..c69c8cd1a70d8363ee2c2ca5dea9fa2527561666 100644 --- a/src/Core/NosSmooth.Comms.Tcp/TcpServer.cs +++ b/src/Core/NosSmooth.Comms.Core/Tcp/TcpServer.cs @@ -10,7 +10,7 @@ using System.Net.Sockets; using NosSmooth.Comms.Data; using Remora.Results; -namespace NosSmooth.Comms.Tcp; +namespace NosSmooth.Comms.Core.Tcp; /// /// A server using tcp. diff --git a/src/Core/NosSmooth.Comms.NamedPipes/Extensions/ServiceCollectionExtensions.cs b/src/Core/NosSmooth.Comms.NamedPipes/Extensions/ServiceCollectionExtensions.cs deleted file mode 100644 index f6a6b32a93d56a874ce30fc76e134f61f015fe6b..0000000000000000000000000000000000000000 --- a/src/Core/NosSmooth.Comms.NamedPipes/Extensions/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// ServiceCollectionExtensions.cs -// -// Copyright (c) František Boháček. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO.Pipes; -using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Comms.Data; - -namespace NosSmooth.Comms.NamedPipes.Extensions; - -/// -/// Extension methods for . -/// -public static class ServiceCollectionExtensions -{ - /// - /// Adds a named pipe client as a . - /// - /// The service collection. - /// A function for resolving the name of the pipe using service provider. - /// The same service collection. - public static IServiceCollection AddNamedPipeClient - (this IServiceCollection serviceCollection, Func pipeNameResolver) - => serviceCollection - .AddSingleton(p => new NamedPipeClient(pipeNameResolver(p))) - .AddSingleton(p => p.GetRequiredService()); - - /// - /// Adds a named pipe server as a . - /// - /// The service collection. - /// A function for resolving the name of the pipe using service provider. - /// The same service collection. - public static IServiceCollection AddNamedPipeServer - (this IServiceCollection serviceCollection, Func pipeNameResolver) - => serviceCollection - .AddSingleton(p => new NamedPipeServer(pipeNameResolver(p))) - .AddSingleton(p => p.GetRequiredService()); -} \ No newline at end of file diff --git a/src/Core/NosSmooth.Comms.NamedPipes/NosSmooth.Comms.NamedPipes.csproj b/src/Core/NosSmooth.Comms.NamedPipes/NosSmooth.Comms.NamedPipes.csproj deleted file mode 100644 index 62eb0489e433be1fc24af7c07c39a3dd2d7db0af..0000000000000000000000000000000000000000 --- a/src/Core/NosSmooth.Comms.NamedPipes/NosSmooth.Comms.NamedPipes.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net7.0 - enable - enable - - - - - - - diff --git a/src/Core/NosSmooth.Comms.Tcp/Extensions/ServiceCollectionExtensions.cs b/src/Core/NosSmooth.Comms.Tcp/Extensions/ServiceCollectionExtensions.cs deleted file mode 100644 index 2bf483b23fbd9b55d51eb2248253cf95f9d9f6ec..0000000000000000000000000000000000000000 --- a/src/Core/NosSmooth.Comms.Tcp/Extensions/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// ServiceCollectionExtensions.cs -// -// Copyright (c) František Boháček. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.Net; -using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Comms.Data; - -namespace NosSmooth.Comms.Tcp.Extensions; - -/// -/// Extension methods for . -/// -public static class ServiceCollectionExtensions -{ - /// - /// Adds tcp server as . - /// - /// The service collection. - /// A resovler used for resolving the ip and port to bind to. - /// The same service collection. - public static IServiceCollection AddTcpServer - ( - this IServiceCollection serviceCollection, - Func bindResolver - ) - { - return serviceCollection - .AddSingleton(p => p.GetRequiredService()) - .AddSingleton - ( - p => - { - var resolved = bindResolver(p); - return new TcpServer(resolved.BindAddress, resolved.Port); - } - ); - } - - /// - /// Adds tcp client as . - /// - /// The service collection. - /// A resovler used for resolving the hostname and port to connect to. - /// The same service collection. - public static IServiceCollection AddTcpClient - ( - this IServiceCollection serviceCollection, - Func connectionResolver - ) - { - return serviceCollection - .AddSingleton(p => p.GetRequiredService()) - .AddSingleton - ( - p => - { - var resolved = connectionResolver(p); - return new TcpClient(resolved.Hostname, resolved.Port); - } - ); - } -} \ No newline at end of file diff --git a/src/Core/NosSmooth.Comms.Tcp/NosSmooth.Comms.Tcp.csproj b/src/Core/NosSmooth.Comms.Tcp/NosSmooth.Comms.Tcp.csproj deleted file mode 100644 index 62eb0489e433be1fc24af7c07c39a3dd2d7db0af..0000000000000000000000000000000000000000 --- a/src/Core/NosSmooth.Comms.Tcp/NosSmooth.Comms.Tcp.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net7.0 - enable - enable - - - - - - - diff --git a/src/Local/NosSmooth.Comms.Inject/DllMain.cs b/src/Local/NosSmooth.Comms.Inject/DllMain.cs index 4ab54a9443a8acda73d2e36dd3c44b58bc1dfc31..2159180c7cc669a251b73f56c348d643a34e310b 100644 --- a/src/Local/NosSmooth.Comms.Inject/DllMain.cs +++ b/src/Local/NosSmooth.Comms.Inject/DllMain.cs @@ -14,8 +14,6 @@ using NosSmooth.Comms.Core.Extensions; using NosSmooth.Comms.Data; using NosSmooth.Comms.Inject.MessageResponders; using NosSmooth.Comms.Inject.PacketResponders; -using NosSmooth.Comms.NamedPipes; -using NosSmooth.Comms.NamedPipes.Extensions; using NosSmooth.Core.Extensions; using NosSmooth.Extensions.SharedBinding.Extensions; using NosSmooth.LocalClient.Extensions; diff --git a/src/Local/NosSmooth.Comms.Inject/MessageResponders/FocusResponder.cs b/src/Local/NosSmooth.Comms.Inject/MessageResponders/FocusResponder.cs index b8e2ce1997d96384cb6be207e96b22eed93e858f..020ae20e5f8f1853d1f391f5d91275b221cf7d70 100644 --- a/src/Local/NosSmooth.Comms.Inject/MessageResponders/FocusResponder.cs +++ b/src/Local/NosSmooth.Comms.Inject/MessageResponders/FocusResponder.cs @@ -5,7 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Comms.Data.Responders; -using NosSmooth.Comms.LocalData; +using NosSmooth.Comms.Inject.Messages; using NosSmooth.LocalBinding; using NosSmooth.LocalBinding.Hooks; using NosSmooth.LocalBinding.Structs; diff --git a/src/Local/NosSmooth.Comms.Inject/MessageResponders/FollowResponder.cs b/src/Local/NosSmooth.Comms.Inject/MessageResponders/FollowResponder.cs index 34c9e3f78162cad27daa8403b822b5b2f918bf90..1bacec48eafba33508bb615c10648c3c4bb2260f 100644 --- a/src/Local/NosSmooth.Comms.Inject/MessageResponders/FollowResponder.cs +++ b/src/Local/NosSmooth.Comms.Inject/MessageResponders/FollowResponder.cs @@ -5,7 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Comms.Data.Responders; -using NosSmooth.Comms.LocalData; +using NosSmooth.Comms.Inject.Messages; using NosSmooth.LocalBinding; using NosSmooth.LocalBinding.Hooks; using NosSmooth.LocalBinding.Structs; diff --git a/src/Local/NosSmooth.Comms.LocalData/FocusMessage.cs b/src/Local/NosSmooth.Comms.Inject/Messages/FocusMessage.cs similarity index 84% rename from src/Local/NosSmooth.Comms.LocalData/FocusMessage.cs rename to src/Local/NosSmooth.Comms.Inject/Messages/FocusMessage.cs index b6e82b211fbdd3321086b70cc8d67c718995d196..6fa3b6653c3e5a9e0b36c50a4ada51430a915956 100644 --- a/src/Local/NosSmooth.Comms.LocalData/FocusMessage.cs +++ b/src/Local/NosSmooth.Comms.Inject/Messages/FocusMessage.cs @@ -4,6 +4,6 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Comms.LocalData; +namespace NosSmooth.Comms.Inject.Messages; public record FocusMessage(long? EntityId); \ No newline at end of file diff --git a/src/Local/NosSmooth.Comms.LocalData/FollowMessage.cs b/src/Local/NosSmooth.Comms.Inject/Messages/FollowMessage.cs similarity index 84% rename from src/Local/NosSmooth.Comms.LocalData/FollowMessage.cs rename to src/Local/NosSmooth.Comms.Inject/Messages/FollowMessage.cs index e4c99b912f5e6843922568231f0d5b9d6b99f29d..cbf02293c45f5283eabe62cb01ef23c1455c0258 100644 --- a/src/Local/NosSmooth.Comms.LocalData/FollowMessage.cs +++ b/src/Local/NosSmooth.Comms.Inject/Messages/FollowMessage.cs @@ -4,6 +4,6 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Comms.LocalData; +namespace NosSmooth.Comms.Inject.Messages; public record FollowMessage(long? EntityId); \ No newline at end of file diff --git a/src/Local/NosSmooth.Comms.Inject/NosSmooth.Comms.Inject.csproj b/src/Local/NosSmooth.Comms.Inject/NosSmooth.Comms.Inject.csproj index ea4359891908ccc6d5c7754d6cfdbe78d60e0b39..c9443b47bd0f773fec2891cd0f5426905ed493a7 100644 --- a/src/Local/NosSmooth.Comms.Inject/NosSmooth.Comms.Inject.csproj +++ b/src/Local/NosSmooth.Comms.Inject/NosSmooth.Comms.Inject.csproj @@ -19,8 +19,6 @@ - - diff --git a/src/Local/NosSmooth.Comms.Local/CommsInjector.cs b/src/Local/NosSmooth.Comms.Local/CommsInjector.cs index 8b1eefa546eb67bbca448303f5fe860f5a133760..a9e1a16263c89028e1e164f3699b616aa9e979e2 100644 --- a/src/Local/NosSmooth.Comms.Local/CommsInjector.cs +++ b/src/Local/NosSmooth.Comms.Local/CommsInjector.cs @@ -7,8 +7,8 @@ using System.Diagnostics; using Microsoft.Extensions.DependencyInjection; using NosSmooth.Comms.Core; +using NosSmooth.Comms.Core.NamedPipes; using NosSmooth.Comms.Data; -using NosSmooth.Comms.NamedPipes; using NosSmooth.Injector; using NosSmooth.LocalBinding; using NosSmooth.LocalBinding.Options; diff --git a/src/Local/NosSmooth.Comms.Local/NosSmooth.Comms.Local.csproj b/src/Local/NosSmooth.Comms.Local/NosSmooth.Comms.Local.csproj index 0fb05e91c3eaefc0f06dcb3baf32a526f5c5997e..806073f9ea19b9fa2fa0efd3f38052fd2b45803d 100644 --- a/src/Local/NosSmooth.Comms.Local/NosSmooth.Comms.Local.csproj +++ b/src/Local/NosSmooth.Comms.Local/NosSmooth.Comms.Local.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Local/NosSmooth.Comms.LocalData/NosSmooth.Comms.LocalData.csproj b/src/Local/NosSmooth.Comms.LocalData/NosSmooth.Comms.LocalData.csproj deleted file mode 100644 index 6836c6808fb21d00e7e92c8af606745302a3cb54..0000000000000000000000000000000000000000 --- a/src/Local/NosSmooth.Comms.LocalData/NosSmooth.Comms.LocalData.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - net7.0 - enable - enable - - - diff --git a/src/Samples/ConsolePacketLogger/ConsolePacketLogger.csproj b/src/Samples/ConsolePacketLogger/ConsolePacketLogger.csproj index 8855e69dd89482ce339cc573892d5dfe4cabd682..291912e839906d22951151a6d80d5861013b1e2f 100644 --- a/src/Samples/ConsolePacketLogger/ConsolePacketLogger.csproj +++ b/src/Samples/ConsolePacketLogger/ConsolePacketLogger.csproj @@ -6,6 +6,7 @@ enable enable app.manifest + false @@ -18,11 +19,7 @@ - - - -