From 1634a077591c010a7c1e7e09efbfc3db44a4c20f Mon Sep 17 00:00:00 2001 From: smartwyy <645583145@qq.com> Date: Sat, 4 May 2024 22:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HybirdFrameworkCore/Autofac/AutofacModuleRegister.cs | 6 +++--- HybirdFrameworkDriver/ChargerServer/IDecoder.cs | 5 ----- HybirdFrameworkDriver/ChargerServer/IEncoder.cs | 6 ------ .../{ChargerServer => TcpServer}/ChannelUtils.cs | 2 +- HybirdFrameworkDriver/TcpServer/IDecoder.cs | 5 +++++ HybirdFrameworkDriver/TcpServer/IEncoder.cs | 6 ++++++ .../{ChargerServer => TcpServer}/IMsgHandler.cs | 2 +- .../{ChargerServer => TcpServer}/IoSession.cs | 2 +- .../{ChargerServer => TcpServer}/Server.cs | 2 +- .../{ChargerServer => TcpServer}/ServerListenerHandler.cs | 2 +- .../{ChargerServer => TcpServer}/SessionMgr.cs | 2 +- HybirdFrameworkServices/Charger/Codec/Decoder.cs | 2 +- HybirdFrameworkServices/Charger/Codec/Encoder.cs | 2 +- HybirdFrameworkServices/Charger/Handler/Cmd106Handler.cs | 2 +- HybirdFrameworkServices/Charger/Handler/IoSessionHandler.cs | 2 +- WebStarter/Program.cs | 2 +- WinFormStarter/Form2.cs | 2 +- 17 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 HybirdFrameworkDriver/ChargerServer/IDecoder.cs delete mode 100644 HybirdFrameworkDriver/ChargerServer/IEncoder.cs rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/ChannelUtils.cs (94%) create mode 100644 HybirdFrameworkDriver/TcpServer/IDecoder.cs create mode 100644 HybirdFrameworkDriver/TcpServer/IEncoder.cs rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/IMsgHandler.cs (59%) rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/IoSession.cs (93%) rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/Server.cs (98%) rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/ServerListenerHandler.cs (97%) rename HybirdFrameworkDriver/{ChargerServer => TcpServer}/SessionMgr.cs (95%) diff --git a/HybirdFrameworkCore/Autofac/AutofacModuleRegister.cs b/HybirdFrameworkCore/Autofac/AutofacModuleRegister.cs index 1fd984d..52e89c1 100644 --- a/HybirdFrameworkCore/Autofac/AutofacModuleRegister.cs +++ b/HybirdFrameworkCore/Autofac/AutofacModuleRegister.cs @@ -83,21 +83,21 @@ namespace HybirdFrameworkCore.Autofac } else { - Type? iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IMsgHandler"); + Type? iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IMsgHandler"); if (iInterface != null) { builder.RegisterType(type).As(iInterface).InstancePerDependency() .PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); } - iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IDecoder"); + iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IDecoder"); if (iInterface != null) { builder.RegisterType(type).As(iInterface).InstancePerDependency() .PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); } - iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IEncoder"); + iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IEncoder"); if (iInterface != null) { builder.RegisterType(type).As(iInterface).InstancePerDependency() diff --git a/HybirdFrameworkDriver/ChargerServer/IDecoder.cs b/HybirdFrameworkDriver/ChargerServer/IDecoder.cs deleted file mode 100644 index 71b7946..0000000 --- a/HybirdFrameworkDriver/ChargerServer/IDecoder.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace HybirdFrameworkDriver.ChargerServer; - -public interface IDecoder -{ -} \ No newline at end of file diff --git a/HybirdFrameworkDriver/ChargerServer/IEncoder.cs b/HybirdFrameworkDriver/ChargerServer/IEncoder.cs deleted file mode 100644 index e0264ce..0000000 --- a/HybirdFrameworkDriver/ChargerServer/IEncoder.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace HybirdFrameworkDriver.ChargerServer; - -public interface IEncoder -{ - -} \ No newline at end of file diff --git a/HybirdFrameworkDriver/ChargerServer/ChannelUtils.cs b/HybirdFrameworkDriver/TcpServer/ChannelUtils.cs similarity index 94% rename from HybirdFrameworkDriver/ChargerServer/ChannelUtils.cs rename to HybirdFrameworkDriver/TcpServer/ChannelUtils.cs index 65f44ef..0bdc145 100644 --- a/HybirdFrameworkDriver/ChargerServer/ChannelUtils.cs +++ b/HybirdFrameworkDriver/TcpServer/ChannelUtils.cs @@ -1,7 +1,7 @@ using DotNetty.Common.Utilities; using DotNetty.Transport.Channels; -namespace HybirdFrameworkDriver.ChargerServer; +namespace HybirdFrameworkDriver.TcpServer; public static class ChannelUtils { diff --git a/HybirdFrameworkDriver/TcpServer/IDecoder.cs b/HybirdFrameworkDriver/TcpServer/IDecoder.cs new file mode 100644 index 0000000..65c6d68 --- /dev/null +++ b/HybirdFrameworkDriver/TcpServer/IDecoder.cs @@ -0,0 +1,5 @@ +namespace HybirdFrameworkDriver.TcpServer; + +public interface IDecoder +{ +} \ No newline at end of file diff --git a/HybirdFrameworkDriver/TcpServer/IEncoder.cs b/HybirdFrameworkDriver/TcpServer/IEncoder.cs new file mode 100644 index 0000000..9cbfde5 --- /dev/null +++ b/HybirdFrameworkDriver/TcpServer/IEncoder.cs @@ -0,0 +1,6 @@ +namespace HybirdFrameworkDriver.TcpServer; + +public interface IEncoder +{ + +} \ No newline at end of file diff --git a/HybirdFrameworkDriver/ChargerServer/IMsgHandler.cs b/HybirdFrameworkDriver/TcpServer/IMsgHandler.cs similarity index 59% rename from HybirdFrameworkDriver/ChargerServer/IMsgHandler.cs rename to HybirdFrameworkDriver/TcpServer/IMsgHandler.cs index a69c1f4..ef24d8b 100644 --- a/HybirdFrameworkDriver/ChargerServer/IMsgHandler.cs +++ b/HybirdFrameworkDriver/TcpServer/IMsgHandler.cs @@ -1,6 +1,6 @@ using DotNetty.Transport.Channels; -namespace HybirdFrameworkDriver.ChargerServer; +namespace HybirdFrameworkDriver.TcpServer; public interface IMsgHandler { diff --git a/HybirdFrameworkDriver/ChargerServer/IoSession.cs b/HybirdFrameworkDriver/TcpServer/IoSession.cs similarity index 93% rename from HybirdFrameworkDriver/ChargerServer/IoSession.cs rename to HybirdFrameworkDriver/TcpServer/IoSession.cs index 99d92d1..ef2a2d8 100644 --- a/HybirdFrameworkDriver/ChargerServer/IoSession.cs +++ b/HybirdFrameworkDriver/TcpServer/IoSession.cs @@ -2,7 +2,7 @@ using DotNetty.Transport.Channels; using log4net; -namespace HybirdFrameworkDriver.ChargerServer; +namespace HybirdFrameworkDriver.TcpServer; public class IoSession diff --git a/HybirdFrameworkDriver/ChargerServer/Server.cs b/HybirdFrameworkDriver/TcpServer/Server.cs similarity index 98% rename from HybirdFrameworkDriver/ChargerServer/Server.cs rename to HybirdFrameworkDriver/TcpServer/Server.cs index d9b7000..35a83b2 100644 --- a/HybirdFrameworkDriver/ChargerServer/Server.cs +++ b/HybirdFrameworkDriver/TcpServer/Server.cs @@ -10,7 +10,7 @@ using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Autofac.Attribute; using log4net; -namespace HybirdFrameworkDriver.ChargerServer +namespace HybirdFrameworkDriver.TcpServer { /// /// netty server diff --git a/HybirdFrameworkDriver/ChargerServer/ServerListenerHandler.cs b/HybirdFrameworkDriver/TcpServer/ServerListenerHandler.cs similarity index 97% rename from HybirdFrameworkDriver/ChargerServer/ServerListenerHandler.cs rename to HybirdFrameworkDriver/TcpServer/ServerListenerHandler.cs index c54e1fa..0f5eb06 100644 --- a/HybirdFrameworkDriver/ChargerServer/ServerListenerHandler.cs +++ b/HybirdFrameworkDriver/TcpServer/ServerListenerHandler.cs @@ -2,7 +2,7 @@ using HybirdFrameworkCore.Autofac.Attribute; using log4net; -namespace HybirdFrameworkDriver.ChargerServer +namespace HybirdFrameworkDriver.TcpServer { [Scope("InstancePerDependency")] diff --git a/HybirdFrameworkDriver/ChargerServer/SessionMgr.cs b/HybirdFrameworkDriver/TcpServer/SessionMgr.cs similarity index 95% rename from HybirdFrameworkDriver/ChargerServer/SessionMgr.cs rename to HybirdFrameworkDriver/TcpServer/SessionMgr.cs index b515174..da1a56f 100644 --- a/HybirdFrameworkDriver/ChargerServer/SessionMgr.cs +++ b/HybirdFrameworkDriver/TcpServer/SessionMgr.cs @@ -3,7 +3,7 @@ using DotNetty.Buffers; using DotNetty.Transport.Channels; using log4net; -namespace HybirdFrameworkDriver.ChargerServer; +namespace HybirdFrameworkDriver.TcpServer; public class SessionMgr { diff --git a/HybirdFrameworkServices/Charger/Codec/Decoder.cs b/HybirdFrameworkServices/Charger/Codec/Decoder.cs index 84c619c..ee1e1ea 100644 --- a/HybirdFrameworkServices/Charger/Codec/Decoder.cs +++ b/HybirdFrameworkServices/Charger/Codec/Decoder.cs @@ -2,7 +2,7 @@ using DotNetty.Codecs; using DotNetty.Transport.Channels; using HybirdFrameworkCore.Autofac.Attribute; -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; namespace HybirdFrameworkServices.Charger.Codec; diff --git a/HybirdFrameworkServices/Charger/Codec/Encoder.cs b/HybirdFrameworkServices/Charger/Codec/Encoder.cs index cae0493..a59d3b2 100644 --- a/HybirdFrameworkServices/Charger/Codec/Encoder.cs +++ b/HybirdFrameworkServices/Charger/Codec/Encoder.cs @@ -2,7 +2,7 @@ using DotNetty.Codecs; using DotNetty.Transport.Channels; using HybirdFrameworkCore.Autofac.Attribute; -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; namespace HybirdFrameworkServices.Charger.Codec; diff --git a/HybirdFrameworkServices/Charger/Handler/Cmd106Handler.cs b/HybirdFrameworkServices/Charger/Handler/Cmd106Handler.cs index f9bfb47..ccdec7e 100644 --- a/HybirdFrameworkServices/Charger/Handler/Cmd106Handler.cs +++ b/HybirdFrameworkServices/Charger/Handler/Cmd106Handler.cs @@ -1,6 +1,6 @@ using DotNetty.Transport.Channels; using HybirdFrameworkCore.Autofac.Attribute; -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; using HybirdFrameworkServices.Charger.Msg; namespace HybirdFrameworkServices.Charger.Handler; diff --git a/HybirdFrameworkServices/Charger/Handler/IoSessionHandler.cs b/HybirdFrameworkServices/Charger/Handler/IoSessionHandler.cs index e1881c2..91990bd 100644 --- a/HybirdFrameworkServices/Charger/Handler/IoSessionHandler.cs +++ b/HybirdFrameworkServices/Charger/Handler/IoSessionHandler.cs @@ -1,6 +1,6 @@ using DotNetty.Transport.Channels; using HybirdFrameworkCore.Autofac.Attribute; -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; namespace HybirdFrameworkServices.Charger.Handler; diff --git a/WebStarter/Program.cs b/WebStarter/Program.cs index 15461db..8914a1d 100644 --- a/WebStarter/Program.cs +++ b/WebStarter/Program.cs @@ -2,7 +2,7 @@ using Autofac; using Autofac.Extensions.DependencyInjection; using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Configuration; -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; using SqlSugar; using SqlSugar.IOC; diff --git a/WinFormStarter/Form2.cs b/WinFormStarter/Form2.cs index d37f9be..317e02a 100644 --- a/WinFormStarter/Form2.cs +++ b/WinFormStarter/Form2.cs @@ -1,4 +1,4 @@ -using HybirdFrameworkDriver.ChargerServer; +using HybirdFrameworkDriver.TcpServer; namespace WinFormStarter;