初始化框架

master
smartwyy 7 months ago
parent 3b9965554b
commit 1634a07759

@ -83,21 +83,21 @@ namespace HybirdFrameworkCore.Autofac
} }
else else
{ {
Type? iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IMsgHandler"); Type? iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IMsgHandler");
if (iInterface != null) if (iInterface != null)
{ {
builder.RegisterType(type).As(iInterface).InstancePerDependency() builder.RegisterType(type).As(iInterface).InstancePerDependency()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); .PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies);
} }
iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IDecoder"); iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IDecoder");
if (iInterface != null) if (iInterface != null)
{ {
builder.RegisterType(type).As(iInterface).InstancePerDependency() builder.RegisterType(type).As(iInterface).InstancePerDependency()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); .PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies);
} }
iInterface = type.GetInterface("HybirdFrameworkDriver.ChargerServer.IEncoder"); iInterface = type.GetInterface("HybirdFrameworkDriver.TcpServer.IEncoder");
if (iInterface != null) if (iInterface != null)
{ {
builder.RegisterType(type).As(iInterface).InstancePerDependency() builder.RegisterType(type).As(iInterface).InstancePerDependency()

@ -1,5 +0,0 @@
namespace HybirdFrameworkDriver.ChargerServer;
public interface IDecoder
{
}

@ -1,6 +0,0 @@
namespace HybirdFrameworkDriver.ChargerServer;
public interface IEncoder
{
}

@ -1,7 +1,7 @@
using DotNetty.Common.Utilities; using DotNetty.Common.Utilities;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
namespace HybirdFrameworkDriver.ChargerServer; namespace HybirdFrameworkDriver.TcpServer;
public static class ChannelUtils public static class ChannelUtils
{ {

@ -0,0 +1,5 @@
namespace HybirdFrameworkDriver.TcpServer;
public interface IDecoder
{
}

@ -0,0 +1,6 @@
namespace HybirdFrameworkDriver.TcpServer;
public interface IEncoder
{
}

@ -1,6 +1,6 @@
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
namespace HybirdFrameworkDriver.ChargerServer; namespace HybirdFrameworkDriver.TcpServer;
public interface IMsgHandler public interface IMsgHandler
{ {

@ -2,7 +2,7 @@
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using log4net; using log4net;
namespace HybirdFrameworkDriver.ChargerServer; namespace HybirdFrameworkDriver.TcpServer;
public class IoSession public class IoSession

@ -10,7 +10,7 @@ using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using log4net; using log4net;
namespace HybirdFrameworkDriver.ChargerServer namespace HybirdFrameworkDriver.TcpServer
{ {
/// <summary> /// <summary>
/// netty server /// netty server

@ -2,7 +2,7 @@
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using log4net; using log4net;
namespace HybirdFrameworkDriver.ChargerServer namespace HybirdFrameworkDriver.TcpServer
{ {
[Scope("InstancePerDependency")] [Scope("InstancePerDependency")]

@ -3,7 +3,7 @@ using DotNetty.Buffers;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using log4net; using log4net;
namespace HybirdFrameworkDriver.ChargerServer; namespace HybirdFrameworkDriver.TcpServer;
public class SessionMgr public class SessionMgr
{ {

@ -2,7 +2,7 @@
using DotNetty.Codecs; using DotNetty.Codecs;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
namespace HybirdFrameworkServices.Charger.Codec; namespace HybirdFrameworkServices.Charger.Codec;

@ -2,7 +2,7 @@
using DotNetty.Codecs; using DotNetty.Codecs;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
namespace HybirdFrameworkServices.Charger.Codec; namespace HybirdFrameworkServices.Charger.Codec;

@ -1,6 +1,6 @@
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
using HybirdFrameworkServices.Charger.Msg; using HybirdFrameworkServices.Charger.Msg;
namespace HybirdFrameworkServices.Charger.Handler; namespace HybirdFrameworkServices.Charger.Handler;

@ -1,6 +1,6 @@
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
namespace HybirdFrameworkServices.Charger.Handler; namespace HybirdFrameworkServices.Charger.Handler;

@ -2,7 +2,7 @@ using Autofac;
using Autofac.Extensions.DependencyInjection; using Autofac.Extensions.DependencyInjection;
using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Configuration; using HybirdFrameworkCore.Configuration;
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
using SqlSugar; using SqlSugar;
using SqlSugar.IOC; using SqlSugar.IOC;

@ -1,4 +1,4 @@
using HybirdFrameworkDriver.ChargerServer; using HybirdFrameworkDriver.TcpServer;
namespace WinFormStarter; namespace WinFormStarter;

Loading…
Cancel
Save