Просмотр исходного кода

1. 整体框架调整 Core、Model、Extend、Daq、Relay

Shun 2 лет назад
Родитель
Сommit
ad29ff12f8
99 измененных файлов с 783 добавлено и 1191 удалено
  1. 1 1
      src/YSAI.Beckhoff/YSAI.Beckhoff.csproj
  2. 4 6
      src/YSAI.Core/YSAI.Core.csproj
  3. 4 3
      src/YSAI.Core/communication/net/http/HttpOperate.cs
  4. 6 5
      src/YSAI.Core/communication/net/tcp/client/TcpClientOperate.cs
  5. 10 9
      src/YSAI.Core/communication/net/tcp/service/TcpServiceOperate.cs
  6. 8 7
      src/YSAI.Core/communication/net/udp/UdpOperate.cs
  7. 6 5
      src/YSAI.Core/communication/net/ws/client/WsClientOperate.cs
  8. 10 9
      src/YSAI.Core/communication/net/ws/service/WsServiceOperate.cs
  9. 5 5
      src/YSAI.Core/communication/serial/SerialOperate.cs
  10. 13 20
      src/YSAI.Core/handler/AddressHandler.cs
  11. 37 37
      src/YSAI.Core/handler/ParseHandler.cs
  12. 277 280
      src/YSAI.Core/handler/RelayHandler.cs
  13. 12 0
      src/YSAI.Core/parse/Class1.cs
  14. 0 553
      src/YSAI.Core/reflection/RIOperate.cs
  15. 12 0
      src/YSAI.Core/relay/Class1.cs
  16. 7 7
      src/YSAI.Core/subscribe/SubscribeData.cs
  17. 3 3
      src/YSAI.Core/subscribe/SubscribeOperate.cs
  18. 2 2
      src/YSAI.Core/subscribe/core/SubscribeService.cs
  19. 5 4
      src/YSAI.Core/subscribe/core/SubscribeSource.cs
  20. 2 2
      src/YSAI.Core/virtualAddress/VirtualAddress.cs
  21. 1 1
      src/YSAI.Core/virtualAddress/VirtualAddressData.cs
  22. 2 2
      src/YSAI.Core/virtualAddress/VirtualAddressManage.cs
  23. 26 5
      src/YSAI.DAQ.sln
  24. 1 1
      src/YSAI.DB/YSAI.DB.csproj
  25. 6 5
      src/YSAI.Kafka/KafkaData.cs
  26. 7 6
      src/YSAI.Kafka/KafkaOperate.cs
  27. 1 1
      src/YSAI.Kafka/YSAI.Kafka.csproj
  28. 2 2
      src/YSAI.Log/YSAI.Log.csproj
  29. 22 0
      src/YSAI.Model/YSAI.Model.csproj
  30. 3 3
      src/YSAI.Core/attribute/DisplayAttribute.cs
  31. 1 1
      src/YSAI.Core/attribute/UnitAttribute.cs
  32. 1 1
      src/YSAI.Core/attribute/VerifyAttribute.cs
  33. 1 1
      src/YSAI.Core/data/Address.cs
  34. 20 14
      src/YSAI.Core/data/AddressDetails.cs
  35. 4 4
      src/YSAI.Core/data/AddressParse.cs
  36. 4 3
      src/YSAI.Core/data/AddressValue.cs
  37. 2 2
      src/YSAI.Core/data/EventResult.cs
  38. 2 2
      src/YSAI.Core/data/OperateResult.cs
  39. 1 1
      src/YSAI.Core/data/ParamStructure.cs
  40. 2 2
      src/YSAI.Core/data/Result.cs
  41. 1 1
      src/YSAI.Core/enum/AddressType.cs
  42. 1 1
      src/YSAI.Core/enum/DataType.cs
  43. 1 1
      src/YSAI.Core/enum/ParseType.cs
  44. 1 1
      src/YSAI.Core/enum/ResultType.cs
  45. 2 2
      src/YSAI.Core/interface/IBaseAbstract.cs
  46. 1 1
      src/YSAI.Core/interface/ICommunication.cs
  47. 2 2
      src/YSAI.Core/interface/IConsumer.cs
  48. 2 2
      src/YSAI.Core/interface/ICreateInstance.cs
  49. 2 2
      src/YSAI.Core/interface/IDaq.cs
  50. 2 2
      src/YSAI.Core/interface/IEvent.cs
  51. 2 2
      src/YSAI.Core/interface/IGetObject.cs
  52. 2 2
      src/YSAI.Core/interface/IGetParam.cs
  53. 2 2
      src/YSAI.Core/interface/IGetStatus.cs
  54. 2 2
      src/YSAI.Core/interface/IOff.cs
  55. 2 2
      src/YSAI.Core/interface/IOn.cs
  56. 2 2
      src/YSAI.Core/interface/IOrAbstract.cs
  57. 2 2
      src/YSAI.Core/interface/IProducer.cs
  58. 2 2
      src/YSAI.Core/interface/IRead.cs
  59. 2 2
      src/YSAI.Core/interface/IRelay.cs
  60. 2 2
      src/YSAI.Core/interface/ISend.cs
  61. 2 2
      src/YSAI.Core/interface/ISendWait.cs
  62. 2 2
      src/YSAI.Core/interface/ISubscribe.cs
  63. 2 2
      src/YSAI.Core/interface/IWrite.cs
  64. 11 13
      src/YSAI.Core/handler/ParamHandler.cs
  65. 1 1
      src/YSAI.Mqtt/YSAI.Mqtt.csproj
  66. 8 7
      src/YSAI.Mqtt/client/MqttClientData.cs
  67. 7 6
      src/YSAI.Mqtt/client/MqttClientOperate.cs
  68. 6 5
      src/YSAI.Mqtt/service/MqttServiceData.cs
  69. 10 9
      src/YSAI.Mqtt/service/MqttServiceOperate.cs
  70. 8 7
      src/YSAI.Mqtt/service/websocket/MqttWebSocketServiceData.cs
  71. 10 9
      src/YSAI.Mqtt/service/websocket/MqttWebSocketServiceOperate.cs
  72. 6 5
      src/YSAI.NetMQ/NetMQData.cs
  73. 7 6
      src/YSAI.NetMQ/NetMQOperate.cs
  74. 1 1
      src/YSAI.NetMQ/YSAI.NetMQ.csproj
  75. 1 1
      src/YSAI.Netty/YSAI.Netty.csproj
  76. 8 7
      src/YSAI.Netty/client/NettyClientData.cs
  77. 8 7
      src/YSAI.Netty/client/NettyClientOperate.cs
  78. 5 4
      src/YSAI.Netty/service/NettyServiceData.cs
  79. 2 2
      src/YSAI.Netty/service/NettyServiceOperate.cs
  80. 7 6
      src/YSAI.RabbitMQ/RabbitMQData.cs
  81. 7 6
      src/YSAI.RabbitMQ/RabbitMQOperate.cs
  82. 1 1
      src/YSAI.RabbitMQ/YSAI.RabbitMQ.csproj
  83. 1 1
      src/YSAI.Redis/RedisData.cs
  84. 2 2
      src/YSAI.Redis/RedisOperate.cs
  85. 2 2
      src/YSAI.Redis/YSAI.Redis.csproj
  86. 1 1
      src/YSAI.Core/reflection/ReflectionData.cs
  87. 4 4
      src/YSAI.Core/reflection/ReflectionOperate.cs
  88. 21 0
      src/YSAI.Reflection/YSAI.Reflection.csproj
  89. 2 2
      src/YSAI.Rpc/YSAI.Rpc.csproj
  90. 4 3
      src/YSAI.Rpc/client/RpcClient.cs
  91. 1 1
      src/YSAI.Rpc/interface/IRpc.cs
  92. 4 3
      src/YSAI.Rpc/service/RpcService.cs
  93. 0 0
      src/YSAI.Script/ScriptData.cs
  94. 4 3
      src/YSAI.Core/script/ScriptOperate.cs
  95. 22 0
      src/YSAI.Script/YSAI.Script.csproj
  96. 6 5
      src/YSAI.Test.All/Program.cs
  97. 10 0
      src/YSAI.Unility/ParamTool.cs
  98. 2 2
      src/YSAI.Unility/YSAI.Unility.csproj
  99. 9 3
      src/YSAI.VT/Program.cs

+ 1 - 1
src/YSAI.Beckhoff/YSAI.Beckhoff.csproj

@@ -16,7 +16,7 @@
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
   </PropertyGroup>
   <ItemGroup>
-    <PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.86" />
+    <PackageReference Include="Beckhoff.TwinCAT.Ads" Version="6.1.125" />
     <PackageReference Include="YSAI.Core" Version="23.327.26637" />
   </ItemGroup>
   <!--<ItemGroup>

+ 4 - 6
src/YSAI.Core/YSAI.Core.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.327.26637</Version>
+    <Version>23.328.23851</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
@@ -12,13 +12,11 @@
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
     <DescriptionType>核心组件</DescriptionType>
     <DescriptionName>Core</DescriptionName>
-    <DescriptionDetails>特性、数据结构、处理、接口、反射、脚本、订阅、虚拟地址、TCP、UDP、HTTP、WS、串口</DescriptionDetails>
+    <DescriptionDetails>处理、反射、脚本、订阅、虚拟地址、TCP、UDP、HTTP、WS、串口</DescriptionDetails>
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
   </PropertyGroup>
   <ItemGroup>
-    <PackageReference Include="Microsoft.ClearScript" Version="7.4.4" />
-    <PackageReference Include="System.IO.Ports" Version="8.0.0" />
-    <PackageReference Include="YSAI.Log" Version="23.319.17368" />
-    <PackageReference Include="YSAI.Unility" Version="23.327.26405" />
+    <PackageReference Include="System.IO.Ports" Version="7.0.0" />
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
 </Project>

+ 4 - 3
src/YSAI.Core/communication/net/http/HttpOperate.cs

@@ -1,6 +1,7 @@
 using System.Net;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 using static YSAI.Core.communication.net.http.HttpData;
 
@@ -146,7 +147,7 @@ namespace YSAI.Core.communication.net.http
                     //释放
                     streamReader.Dispose();
                     //返回数据
-                    return Break("Request", true, "请求成功", new ResponseData() { ResData = ResponseData, ResHeadersData = ResponseHeadersData, StatusCode = StateCode, ReqData = requestData, ResCookieData = cookies }, @enum.ResultType.Dynamic);
+                    return Break("Request", true, "请求成功", new ResponseData() { ResData = ResponseData, ResHeadersData = ResponseHeadersData, StatusCode = StateCode, ReqData = requestData, ResCookieData = cookies }, ResultType.Dynamic);
                 }
             }
             catch (Exception ex)

+ 6 - 5
src/YSAI.Core/communication/net/tcp/client/TcpClientOperate.cs

@@ -1,7 +1,8 @@
 using System.Net;
 using System.Net.Sockets;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.net.tcp.client
@@ -160,7 +161,7 @@ namespace YSAI.Core.communication.net.tcp.client
                                 int bytes = Communication.GetStream().ReadAsync(CacheBuffer, 0, alen).WaitAsync(token.Token).Result;  //读取数据
                                 if (bytes > 0)
                                 {
-                                    OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据", CacheBuffer.TrimEnd(), @enum.ResultType.Byte));  //数据传递出去
+                                    OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据", CacheBuffer.TrimEnd(), ResultType.Byte));  //数据传递出去
                                 }
                                 else
                                 {
@@ -418,7 +419,7 @@ namespace YSAI.Core.communication.net.tcp.client
                         {
                             if (Byte.TrimEnd().Length > 0)
                             {
-                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: @enum.ResultType.Byte);
+                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: ResultType.Byte);
                             }
                             else
                             {
@@ -451,7 +452,7 @@ namespace YSAI.Core.communication.net.tcp.client
             Depart("GetObject");
             if (Communication != null && Communication.Connected)
             {
-                return Break("GetObject", true, RData: Communication, RType: @enum.ResultType.Object);
+                return Break("GetObject", true, RData: Communication, RType: ResultType.Object);
             }
             return Break("GetObject", false, "未连接");
         }

+ 10 - 9
src/YSAI.Core/communication/net/tcp/service/TcpServiceOperate.cs

@@ -1,8 +1,9 @@
 using System.Collections.Concurrent;
 using System.Net;
 using System.Net.Sockets;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.net.tcp.service
@@ -140,7 +141,7 @@ namespace YSAI.Core.communication.net.tcp.service
                             //把此对象添加到字典中
                             ClientIoc.AddOrUpdate(IpPort, client, (k, v) => client);
                         }
-                        OnEventHandler(this, new EventResult(true, $"[{IpPort}]连接成功", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端连接, IpPort = IpPort }, @enum.ResultType.String));
+                        OnEventHandler(this, new EventResult(true, $"[{IpPort}]连接成功", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端连接, IpPort = IpPort }, ResultType.String));
                     }
                     catch (Exception ex)
                     {
@@ -170,11 +171,11 @@ namespace YSAI.Core.communication.net.tcp.service
                         int length = ClientCon.ReceiveAsync(DataByte, SocketFlags.Partial).WaitAsync(token.Token).Result; // 接收数据,并返回数据的长度;
                         if (length > 0)
                         {
-                            OnEventHandler(this, new EventResult(true, $"[{IpPort}]数据接收成功", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.消息接收, IpPort = IpPort, Data = DataByte.Array.TrimEnd() }, @enum.ResultType.Byte));
+                            OnEventHandler(this, new EventResult(true, $"[{IpPort}]数据接收成功", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.消息接收, IpPort = IpPort, Data = DataByte.Array.TrimEnd() }, ResultType.Byte));
                         }
                         else
                         {
-                            OnEventHandler(this, new EventResult(false, $"[{IpPort}]发来的数据长度错误(小于等于零),已强制关闭连接", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端断开, IpPort = IpPort }, @enum.ResultType.Object));
+                            OnEventHandler(this, new EventResult(false, $"[{IpPort}]发来的数据长度错误(小于等于零),已强制关闭连接", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端断开, IpPort = IpPort }, ResultType.Object));
                             //移除此客户端
                             RemoveAsync(IpPort);
                             return;
@@ -182,7 +183,7 @@ namespace YSAI.Core.communication.net.tcp.service
                     }
                     catch (Exception ex)
                     {
-                        OnEventHandler(this, new EventResult(false, $"监控[{IpPort}]消息异常:{ex.Message}", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端断开, IpPort = IpPort }, @enum.ResultType.Object));
+                        OnEventHandler(this, new EventResult(false, $"监控[{IpPort}]消息异常:{ex.Message}", new TcpServiceData.ClientMessage { Step = TcpServiceData.Steps.客户端断开, IpPort = IpPort }, ResultType.Object));
                         //移除此客户端
                         RemoveAsync(IpPort);
                         return;
@@ -344,7 +345,7 @@ namespace YSAI.Core.communication.net.tcp.service
 
                         if (Message.Count > 0)
                         {
-                            return Break("Send", false, "存在失败数据", Message, @enum.ResultType.Object);
+                            return Break("Send", false, "存在失败数据", Message, ResultType.Object);
                         }
                     }
                     else
@@ -354,12 +355,12 @@ namespace YSAI.Core.communication.net.tcp.service
                         {
                             if (ClientIoc[IpPort].SocketObj.Send(Data) <= 0)
                             {
-                                return Break("Send", false, $"数据发送[{IpPort}]失败", Message, @enum.ResultType.Object);
+                                return Break("Send", false, $"数据发送[{IpPort}]失败", Message, ResultType.Object);
                             }
                         }
                         else
                         {
-                            return Break("Send", false, $"数据发送失败,[{IpPort}]不存在", Message, @enum.ResultType.Object);
+                            return Break("Send", false, $"数据发送失败,[{IpPort}]不存在", Message, ResultType.Object);
                         }
                     }
                     return Break("Send", true);

+ 8 - 7
src/YSAI.Core/communication/net/udp/UdpOperate.cs

@@ -1,7 +1,8 @@
 using System.Net;
 using System.Net.Sockets;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.net.udp
@@ -105,7 +106,7 @@ namespace YSAI.Core.communication.net.udp
                             UdpReceiveResult urr = Communication.ReceiveAsync(token.Token).Result;  //读取数据
                             if (urr.Buffer.Length > 0)
                             {
-                                OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据,来自[{urr.RemoteEndPoint}]", new UdpData.TerminalMessage { IpPort = urr.RemoteEndPoint.ToString(), Data = urr.Buffer.TrimEnd() }, @enum.ResultType.Byte));  //数据传递出去
+                                OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据,来自[{urr.RemoteEndPoint}]", new UdpData.TerminalMessage { IpPort = urr.RemoteEndPoint.ToString(), Data = urr.Buffer.TrimEnd() }, ResultType.Byte));  //数据传递出去
                             }
                             else
                             {
@@ -333,7 +334,7 @@ namespace YSAI.Core.communication.net.udp
                         {
                             if (Byte.TrimEnd().Length > 0)
                             {
-                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: @enum.ResultType.Byte);
+                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: ResultType.Byte);
                             }
                             else
                             {
@@ -382,7 +383,7 @@ namespace YSAI.Core.communication.net.udp
                                     UdpReceiveResult urr = Communication.ReceiveAsync().Result;  //读取数据
                                     if (urr.Buffer.Length > 0)
                                     {
-                                        OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据,来自[{urr.RemoteEndPoint}]", new UdpData.TerminalMessage { IpPort = urr.RemoteEndPoint.ToString(), Data = urr.Buffer.TrimEnd() }, @enum.ResultType.Byte));  //数据传递出去
+                                        OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据,来自[{urr.RemoteEndPoint}]", new UdpData.TerminalMessage { IpPort = urr.RemoteEndPoint.ToString(), Data = urr.Buffer.TrimEnd() }, ResultType.Byte));  //数据传递出去
                                     }
                                     else
                                     {
@@ -400,7 +401,7 @@ namespace YSAI.Core.communication.net.udp
                         {
                             if (Byte.Length > 0)
                             {
-                                return Break("SendWait", true, RData: Byte, RType: @enum.ResultType.Byte);
+                                return Break("SendWait", true, RData: Byte, RType: ResultType.Byte);
                             }
                             else
                             {
@@ -432,7 +433,7 @@ namespace YSAI.Core.communication.net.udp
             Depart("GetObject");
             if (Communication != null)
             {
-                return Break("GetObject", true, RData: Communication, RType: @enum.ResultType.Object);
+                return Break("GetObject", true, RData: Communication, RType: ResultType.Object);
             }
             return Break("GetObject", false, "未连接");
         }

+ 6 - 5
src/YSAI.Core/communication/net/ws/client/WsClientOperate.cs

@@ -1,6 +1,7 @@
 using System.Net.WebSockets;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.net.ws.client
@@ -175,7 +176,7 @@ namespace YSAI.Core.communication.net.ws.client
                             WebSocketReceiveResult result = Communication.ReceiveAsync(CacheBuffer, token.Token).WaitAsync(token.Token).Result;   //读取数据
                             if (result.Count > 0)
                             {
-                                OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据", CacheBuffer.Array.TrimEnd(), @enum.ResultType.Byte));  //数据传递出去
+                                OnEventHandler(this, new EventResult(true, $"接收到[{TAG}]监控数据", CacheBuffer.Array.TrimEnd(), ResultType.Byte));  //数据传递出去
                             }
                             else
                             {
@@ -414,7 +415,7 @@ namespace YSAI.Core.communication.net.ws.client
                         {
                             if (Byte.TrimEnd().Length > 0)
                             {
-                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: @enum.ResultType.Byte);
+                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: ResultType.Byte);
                             }
                             else
                             {
@@ -446,7 +447,7 @@ namespace YSAI.Core.communication.net.ws.client
             Depart("GetObject");
             if (Communication != null && Communication.State.Equals(WebSocketState.Open))
             {
-                return Break("GetObject", true, RData: Communication, RType: @enum.ResultType.Object);
+                return Break("GetObject", true, RData: Communication, RType: ResultType.Object);
             }
             return Break("GetObject", false, "未连接");
         }

+ 10 - 9
src/YSAI.Core/communication/net/ws/service/WsServiceOperate.cs

@@ -1,8 +1,9 @@
 using System.Collections.Concurrent;
 using System.Net;
 using System.Net.WebSockets;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.net.ws.service
@@ -144,7 +145,7 @@ namespace YSAI.Core.communication.net.ws.service
                                     };
                                     //把此对象添加到字典中
                                     ClientIoc.AddOrUpdate(IpPort, client, (k, v) => client);
-                                    OnEventHandler(this, new EventResult(true, $"[{IpPort}]连接成功", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端连接, IpPort = IpPort }, @enum.ResultType.String));
+                                    OnEventHandler(this, new EventResult(true, $"[{IpPort}]连接成功", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端连接, IpPort = IpPort }, ResultType.String));
                                 }
                             }
                             catch
@@ -187,11 +188,11 @@ namespace YSAI.Core.communication.net.ws.service
                         WebSocketReceiveResult result = webSocket.ReceiveAsync(DataByte, token.Token).Result; // 接收数据,并返回数据的长度;
                         if (result.Count > 0)
                         {
-                            OnEventHandler(this, new EventResult(true, $"[{IpPort}]数据接收成功", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.消息接收, IpPort = IpPort, Data = DataByte.Array.TrimEnd() }, @enum.ResultType.Byte));
+                            OnEventHandler(this, new EventResult(true, $"[{IpPort}]数据接收成功", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.消息接收, IpPort = IpPort, Data = DataByte.Array.TrimEnd() }, ResultType.Byte));
                         }
                         else
                         {
-                            OnEventHandler(this, new EventResult(false, $"[{IpPort}]发来的数据长度错误(小于等于零),已强制关闭连接", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端断开, IpPort = IpPort }, @enum.ResultType.Object));
+                            OnEventHandler(this, new EventResult(false, $"[{IpPort}]发来的数据长度错误(小于等于零),已强制关闭连接", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端断开, IpPort = IpPort }, ResultType.Object));
                             //移除此客户端
                             RemoveAsync(IpPort);
                             //强制退出此线程
@@ -200,7 +201,7 @@ namespace YSAI.Core.communication.net.ws.service
                     }
                     catch (Exception ex)
                     {
-                        OnEventHandler(this, new EventResult(false, $"监控[{IpPort}]消息异常:{ex.Message}", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端断开, IpPort = IpPort }, @enum.ResultType.Object));
+                        OnEventHandler(this, new EventResult(false, $"监控[{IpPort}]消息异常:{ex.Message}", new WsServiceData.ClientMessage { Step = WsServiceData.Steps.客户端断开, IpPort = IpPort }, ResultType.Object));
                         //移除此客户端
                         RemoveAsync(IpPort);
                         return;
@@ -371,7 +372,7 @@ namespace YSAI.Core.communication.net.ws.service
 
                         if (Message.Count > 0)
                         {
-                            return Break("Send", false, "存在失败数据", Message, @enum.ResultType.Object);
+                            return Break("Send", false, "存在失败数据", Message, ResultType.Object);
                         }
                     }
                     else
@@ -385,12 +386,12 @@ namespace YSAI.Core.communication.net.ws.service
                             }
                             catch (Exception ex)
                             {
-                                return Break("Send", false, $"数据发送[{IpPort}]异常:{ex.Message}", Message, @enum.ResultType.Object);
+                                return Break("Send", false, $"数据发送[{IpPort}]异常:{ex.Message}", Message, ResultType.Object);
                             }
                         }
                         else
                         {
-                            return Break("Send", false, $"数据发送失败,[{IpPort}]不存在", Message, @enum.ResultType.Object);
+                            return Break("Send", false, $"数据发送失败,[{IpPort}]不存在", Message, ResultType.Object);
                         }
                     }
                     return Break("Send", true);

+ 5 - 5
src/YSAI.Core/communication/serial/SerialOperate.cs

@@ -1,7 +1,7 @@
 using System.IO.Ports;
-using YSAI.Core.data;
-using YSAI.Core.@enum;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.communication.serial
@@ -309,7 +309,7 @@ namespace YSAI.Core.communication.serial
                         {
                             if (Byte.TrimEnd().Length > 0)
                             {
-                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: @enum.ResultType.Byte);
+                                return Break("SendWait", true, RData: Byte.TrimEnd(), RType: ResultType.Byte);
                             }
                             else
                             {
@@ -341,7 +341,7 @@ namespace YSAI.Core.communication.serial
             Depart("GetObject");
             if (Communication != null && Communication.IsOpen)
             {
-                return Break("GetObject", true, RData: Communication, RType: @enum.ResultType.Object);
+                return Break("GetObject", true, RData: Communication, RType: ResultType.Object);
             }
             return Break("GetObject", false, "未连接");
         }

+ 13 - 20
src/YSAI.Core/handler/AddressHandler.cs

@@ -1,7 +1,5 @@
-using YSAI.Core.data;
-using YSAI.Core.reflection;
-using YSAI.Log;
-using YSAI.Unility;
+using YSAI.Log;
+using YSAI.Model.data;
 
 namespace YSAI.Core.handler
 {
@@ -20,11 +18,6 @@ namespace YSAI.Core.handler
         /// </summary>
         private static readonly string ExecuteDisposeLog = "ExecuteDispose.log";
 
-        /// <summary>
-        /// 反射操作
-        /// </summary>
-        private static readonly RIOperate reflectionOperate = RIOperate.Instance();
-
         /// <summary>
         /// 执行数据处理
         /// 收到的底层数据,调用此方法,直接返回
@@ -58,17 +51,17 @@ namespace YSAI.Core.handler
                 addressValue.OriginalValue = originalValue;
                 addressValue.Quality = Quality;
 
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //转发
-                    OperateResult operateResult = RelayHandler.Produce("Message", addressValue.ToJson().JsonFormatting());
-                    if (!operateResult.State)
-                    {
-                        //转发失败存入本地记录
-                        LogHelper.Error("{" + $"\"Value\":{addressValue.ToJson()},\"State\":\"{operateResult.State}\",\"Exception\":\"{operateResult.Message}\"" + "}", FailDataLog);
-                    }
-                }
+                ////反射状态为true才进行操作
+                //if (reflectionOperate.ReflectionState)
+                //{
+                //    //转发
+                //    OperateResult operateResult = RelayHandler.Produce("Message", addressValue.ToJson().JsonFormatting());
+                //    if (!operateResult.State)
+                //    {
+                //        //转发失败存入本地记录
+                //        LogHelper.Error("{" + $"\"Value\":{addressValue.ToJson()},\"State\":\"{operateResult.State}\",\"Exception\":\"{operateResult.Message}\"" + "}", FailDataLog);
+                //    }
+                //}
 
                 return addressValue;
             }

+ 37 - 37
src/YSAI.Core/handler/ParseHandler.cs

@@ -1,8 +1,4 @@
-using YSAI.Core.data;
-using YSAI.Core.@enum;
-using YSAI.Core.reflection;
-using YSAI.Core.script;
-using YSAI.Log;
+using YSAI.Model.data;
 
 namespace YSAI.Core.handler
 {
@@ -19,7 +15,7 @@ namespace YSAI.Core.handler
         /// <summary>
         /// 反射操作
         /// </summary>
-        private static readonly RIOperate reflectionOperate = RIOperate.Instance();
+        //private static readonly RIOperate reflectionOperate = RIOperate.Instance();
 
         /// <summary>
         /// 数据解析
@@ -31,38 +27,42 @@ namespace YSAI.Core.handler
         {
             //最新值
             string? NewValue = value;
-            if (addressDetails.AddressParseParam != null)
-            {
-                try
-                {
-                    switch (addressDetails.AddressParseParam.ParseType)
-                    {
-                        case ParseType.MethodAnalysis:
-                            NewValue = reflectionOperate.ExecuteMethod(addressDetails.AddressParseParam.ReflectionSN, new object[] { value })?.ToString();
-                            break;
 
-                        case ParseType.ScriptAnalysis:
-                            using (ScriptOperate scriptOperate = ScriptOperate.Instance(addressDetails.AddressParseParam.Script))  //通过脚本解析
-                            {
-                                OperateResult operateResult = scriptOperate.Execute(addressDetails.AddressParseParam.Script.ScriptType, addressDetails.AddressParseParam.Script.ScriptCode, addressDetails.AddressParseParam.Script.ScriptFunction, value);
-                                if (operateResult.State)
-                                {
-                                    NewValue = operateResult.RData?.ToString();
-                                }
-                            }
-                            break;
-                    }
-                    if (string.IsNullOrEmpty(NewValue))
-                    {
-                        NewValue = value;
-                    }
-                    return NewValue;
-                }
-                catch (Exception ex)
-                {
-                    LogHelper.Error("解析异常:" + ex.ToString(), ParseLog);
-                }
-            }
+            //if (addressDetails.AddressParseParam != null)
+            //{
+            //    try
+            //    {
+            //        switch (addressDetails.AddressParseParam.ParseType)
+            //        {
+            //            case ParseType.MethodAnalysis:
+            //                //NewValue = reflectionOperate.ExecuteMethod(addressDetails.AddressParseParam.ReflectionSN, new object[] { value })?.ToString();
+            //                break;
+
+            //            case ParseType.ScriptAnalysis:
+
+            //                //ScriptData.Basics? basics = addressDetails.AddressParseParam.ScriptBasics as ScriptData.Basics;
+            //                //if (basics == null) break;
+            //                //using (ScriptOperate scriptOperate = ScriptOperate.Instance(basics))  //通过脚本解析
+            //                //{
+            //                //    OperateResult operateResult = scriptOperate.Execute(basics.ScriptType, basics.ScriptCode, basics.ScriptFunction, value);
+            //                //    if (operateResult.State)
+            //                //    {
+            //                //        NewValue = operateResult.RData?.ToString();
+            //                //    }
+            //                //}
+            //                break;
+            //        }
+            //        if (string.IsNullOrEmpty(NewValue))
+            //        {
+            //            NewValue = value;
+            //        }
+            //        return NewValue;
+            //    }
+            //    catch (Exception ex)
+            //    {
+            //        LogHelper.Error("解析异常:" + ex.ToString(), ParseLog);
+            //    }
+            //}
             return value;
         }
     }

+ 277 - 280
src/YSAI.Core/handler/RelayHandler.cs

@@ -1,7 +1,4 @@
-using YSAI.Core.data;
-using YSAI.Core.reflection;
-
-namespace YSAI.Core.handler
+namespace YSAI.Core.handler
 {
     /// <summary>
     /// 转发处理
@@ -11,291 +8,291 @@ namespace YSAI.Core.handler
         /// <summary>
         /// 反射操作
         /// </summary>
-        private static readonly RIOperate reflectionOperate = RIOperate.Instance();
+        //private static readonly RIOperate reflectionOperate = RIOperate.Instance();
 
-        /// <summary>
-        /// 订阅
-        /// </summary>
-        /// <param name="Topic">主题</param>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult Subscribe(string Topic, string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[Subscribe]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 订阅
+        ///// </summary>
+        ///// <param name="Topic">主题</param>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult Subscribe(string Topic, string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[Subscribe]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 取消订阅
-        /// </summary>
-        /// <param name="Topic">主题</param>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult UnSubscribe(string Topic, string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[UnSubscribe]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 取消订阅
+        ///// </summary>
+        ///// <param name="Topic">主题</param>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult UnSubscribe(string Topic, string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[UnSubscribe]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 生产
-        /// </summary>
-        /// <param name="Topic">主题</param>
-        /// <param name="Content">内容</param>
-        /// <param name="ISns">实例唯一标识符集合,空则全部发送</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult Produce(string Topic, string Content, List<string>? ISns = null)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[Produce]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, Content, ISns }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 生产
+        ///// </summary>
+        ///// <param name="Topic">主题</param>
+        ///// <param name="Content">内容</param>
+        ///// <param name="ISns">实例唯一标识符集合,空则全部发送</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult Produce(string Topic, string Content, List<string>? ISns = null)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[Produce]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { Topic, Content, ISns }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 程序集唯一标识符集合
-        /// </summary>
-        public static List<string>? TypeSns()
-        {
-            if (reflectionOperate != null)
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[TypeSns]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", null) as List<string>;
-                }
-            }
-            return null;
-        }
+        ///// <summary>
+        ///// 程序集唯一标识符集合
+        ///// </summary>
+        //public static List<string>? TypeSns()
+        //{
+        //    if (reflectionOperate != null)
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[TypeSns]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", null) as List<string>;
+        //        }
+        //    }
+        //    return null;
+        //}
 
-        /// <summary>
-        /// 实例唯一标识符集合
-        /// </summary>
-        public static List<string>? InstanceSns()
-        {
-            if (reflectionOperate != null)
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[InstanceSns]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", null) as List<string>;
-                }
-            }
-            return null;
-        }
+        ///// <summary>
+        ///// 实例唯一标识符集合
+        ///// </summary>
+        //public static List<string>? InstanceSns()
+        //{
+        //    if (reflectionOperate != null)
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[InstanceSns]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", null) as List<string>;
+        //        }
+        //    }
+        //    return null;
+        //}
 
-        /// <summary>
-        /// 释放指定实例
-        /// </summary>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult DisposeISn(string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[DisposeISn]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 释放指定实例
+        ///// </summary>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult DisposeISn(string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[DisposeISn]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 移除指定实例
-        /// </summary>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult RemoveISn(string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[RemoveISn]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 移除指定实例
+        ///// </summary>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult RemoveISn(string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[RemoveISn]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 打开
-        /// </summary>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult On(string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[On]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 打开
+        ///// </summary>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult On(string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[On]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 关闭
-        /// </summary>
-        /// <param name="ISn">实例唯一标识符</param>
-        /// <returns>统一出参</returns>
-        public static OperateResult Off(string ISn)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //方法的唯一标识符
-                    string MethodSN = "[Off]";
-                    //执行转发方法
-                    return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 关闭
+        ///// </summary>
+        ///// <param name="ISn">实例唯一标识符</param>
+        ///// <returns>统一出参</returns>
+        //public static OperateResult Off(string ISn)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //方法的唯一标识符
+        //            string MethodSN = "[Off]";
+        //            //执行转发方法
+        //            return reflectionOperate.ExecuteMethod($"{ClassSN}{MethodSN}", new object[] { ISn }) as OperateResult;
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
 
-        /// <summary>
-        /// 转发事件注册
-        /// </summary>
-        /// <returns></returns>
-        public static OperateResult RelayEventRegister(Action<object, object> action, bool Register = true)
-        {
-            try
-            {
-                //反射状态为true才进行操作
-                if (reflectionOperate.ReflectionState)
-                {
-                    //类的唯一标识符
-                    string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
-                    //事件的唯一标识符
-                    string EventSN = "[OnEvent]";
-                    //注册事件
-                    return reflectionOperate.RegisterEvent($"{ClassSN}{EventSN}", Register, P2: action);
-                }
-                else
-                {
-                    return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
-                }
-            }
-            catch (Exception ex)
-            {
-                return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
-            }
-        }
+        ///// <summary>
+        ///// 转发事件注册
+        ///// </summary>
+        ///// <returns></returns>
+        //public static OperateResult RelayEventRegister(Action<object, object> action, bool Register = true)
+        //{
+        //    try
+        //    {
+        //        //反射状态为true才进行操作
+        //        if (reflectionOperate.ReflectionState)
+        //        {
+        //            //类的唯一标识符
+        //            string ClassSN = "YSAI.RelayManage.RelayManageOperate[Instance]";
+        //            //事件的唯一标识符
+        //            string EventSN = "[OnEvent]";
+        //            //注册事件
+        //            return reflectionOperate.RegisterEvent($"{ClassSN}{EventSN}", Register, P2: action);
+        //        }
+        //        else
+        //        {
+        //            return new OperateResult(false, $"反射状态 {reflectionOperate.ReflectionState} 不做此操作", 1);
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return new OperateResult(false, $"转发事件注册异常:{ex.Message}", 1);
+        //    }
+        //}
     }
 }

+ 12 - 0
src/YSAI.Core/parse/Class1.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace YSAI.Core.parse
+{
+    internal class Class1
+    {
+    }
+}

+ 0 - 553
src/YSAI.Core/reflection/RIOperate.cs

@@ -1,553 +0,0 @@
-using Newtonsoft.Json.Linq;
-using System.Collections.Concurrent;
-using System.Reflection;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
-using YSAI.Log;
-using YSAI.Unility;
-using static YSAI.Core.reflection.ReflectionData;
-using static YSAI.Core.reflection.ReflectionData.Basics;
-using static YSAI.Core.reflection.ReflectionData.Basics.DllData;
-using static YSAI.Core.reflection.ReflectionData.Basics.DllData.NamespaceData;
-using static YSAI.Core.reflection.ReflectionData.Basics.DllData.NamespaceData.ClassData;
-
-namespace YSAI.Core.reflection
-{
-    /*
-
-        1.你得先生成配置
-
-        2.在初始化
-
-        3.在调用方法或注册事件
-
-     */
-
-    /// <summary>
-    /// 内部反射操作
-    /// </summary>
-    public class RIOperate : IBaseAbstract, IDisposable
-    {
-        protected override string TAG => "RIOperate";
-
-        /// <summary>
-        /// 文件夹
-        /// </summary>
-        public static readonly string ConfigDirectory = "config";
-
-        /// <summary>
-        /// 文件
-        /// </summary>
-        public static readonly string ConfigFile = $"{AppDomain.CurrentDomain.BaseDirectory}{ConfigDirectory}//ReflectionConfig.json";
-
-        /// <summary>
-        /// 配置数据
-        /// </summary>
-        private Basics? basics;
-
-        /// <summary>
-        /// 获取配置
-        /// </summary>
-        /// <returns></returns>
-        public Basics? GetConfig()
-        {
-            try
-            {
-                if (File.Exists(ConfigFile))  //配置存在
-                {
-                    return JsonTool.StringToJsonEntity<Basics>(FileTool.FileToString(ConfigFile));
-                }
-            }
-            catch (Exception ex)
-            {
-                LogHelper.Error($"获取配置异常:{ex.Message}", $"{TAG}.log", ex);
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// 设置配置
-        /// </summary>
-        /// <returns></returns>
-        public bool SetConfig(Basics basics)
-        {
-            try
-            {
-                //实体转JSON字符串
-                string json = JsonTool.JsonEntityToString(basics);
-                //写入文件
-                File.WriteAllText(ConfigFile, json.JsonFormatting());
-                return true;
-            }
-            catch (Exception ex)
-            {
-                LogHelper.Error($"设置配置异常:{ex.Message}", $"{TAG}.log", ex);
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// 反射状态
-        /// </summary>
-        public bool ReflectionState { get; set; }
-
-        /// <summary>
-        /// 构造函数处理配置
-        /// </summary>
-        public RIOperate()
-        {
-            //获取配置
-            this.basics = GetConfig();
-            if (basics != null)
-            {
-                OperateResult operateResult = Init();
-                if (!operateResult.State)
-                {
-                    LogHelper.Error("反射初始化异常:" + operateResult.Message, $"{TAG}.log");
-                }
-            }
-        }
-
-        private static readonly object Lock = new object();  //锁
-        private static RIOperate? ThisObjList; //自身对象
-
-        /// <summary>
-        /// 单例模式
-        /// </summary>
-        /// <returns></returns>
-        public static RIOperate Instance()
-        {
-            if (ThisObjList == null)
-            {
-                lock (Lock)
-                {
-                    if (ThisObjList == null)
-                    {
-                        ThisObjList = new RIOperate();
-                    }
-                }
-            }
-            return ThisObjList;
-        }
-
-        /// <summary>
-        /// 方法的IOC容器
-        /// key 标识符,$"{ClassData.SN}{MethodData.SN}"
-        /// value (个个Dll反射的结果)
-        /// </summary>
-        private ConcurrentDictionary<string, ReflectionMethodResult> MethodIocContainer = new ConcurrentDictionary<string, ReflectionMethodResult>();
-
-        /// <summary>
-        /// 事件的IOC容器
-        /// key 标识符,$"{ClassData.SN}{MethodData.SN}"
-        /// value (个个Dll反射的结果)
-        /// </summary>
-        private ConcurrentDictionary<string, ReflectionEventResult> EventIocContainer = new ConcurrentDictionary<string, ReflectionEventResult>();
-
-        /// <summary>
-        /// 对象容器
-        /// </summary>
-        private ConcurrentDictionary<string, object> ObjectIocContainer = new ConcurrentDictionary<string, object>();
-
-        /// <summary>
-        /// 初始化
-        /// </summary>
-        /// <returns></returns>
-        public OperateResult Init(Basics data)
-        {
-            Depart("Init");
-            try
-            {
-                //得到DLL数据
-                foreach (var DllData in data.DllDatas)
-                {
-                    Assembly? assembly = null;
-                    //是不是绝对路径
-                    if (DllData.IsAbsolutePath)
-                    {
-                        if (File.Exists(DllData.DllPath))
-                        {
-                            assembly = Assembly.LoadFile(DllData.DllPath);
-                        }
-                        else
-                        {
-                            return Break("Init", false, $"{DllData.DllPath} 文件不存在");
-                        }
-                    }
-                    else
-                    {
-                        //文件路径拼接
-                        string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DllData.DllPath);
-                        //文件判断
-                        if (File.Exists(path))
-                        {
-                            assembly = Assembly.LoadFile(path);
-                        }
-                        else
-                        {
-                            return Break("Init", false, $"{path} 文件不存在");
-                        }
-                    }
-
-                    foreach (var NamespaceData in DllData.NamespaceDatas)
-                    {
-                        //Dll下需要反射的类数据
-                        foreach (var ClassData in NamespaceData.ClassDatas)
-                        {
-                            //命名空间加类名
-                            string NamespaceAndClassName = $"{NamespaceData.Namespace}.{ClassData.ClassName}";
-
-                            //获取类型
-                            Type? NamespaceAndClassNameType = assembly.GetType(NamespaceAndClassName, false, true);
-
-                            //类型不能为空
-                            if (NamespaceAndClassNameType != null)
-                            {
-                                //创建该对象的实例
-                                object? instanceObject = CreateInstance(NamespaceAndClassNameType, ClassData.ConstructorParam);
-                                if (instanceObject != null)
-                                {
-                                    if (!ObjectIocContainer.ContainsKey(NamespaceAndClassNameType.FullName))
-                                    {
-                                        ObjectIocContainer.TryAdd(NamespaceAndClassNameType.FullName, instanceObject);
-                                    }
-                                }
-                                if (ClassData.MethodDatas != null)
-                                {
-                                    //遍历方法
-                                    foreach (var MethodData in ClassData.MethodDatas)
-                                    {
-                                        //获取方法
-                                        MethodInfo? methodInfo = NamespaceAndClassNameType.GetMethod(MethodData.MethodName);
-                                        if (methodInfo != null)
-                                        {
-                                            //结果数据
-                                            ReflectionMethodResult reflectResult = new ReflectionMethodResult()
-                                            {
-                                                InstanceObject = ObjectIocContainer[NamespaceAndClassNameType.FullName],
-                                                Method = methodInfo
-                                            };
-                                            //存在直接更新,不存在新增
-                                            MethodIocContainer.AddOrUpdate($"{ClassData.SN}{MethodData.SN}", reflectResult, (K, V) => reflectResult);
-
-                                            //执行此方法
-                                            if (MethodData.WhetherExecute)
-                                            {
-                                                //执行此函数,不管返回结果
-                                                methodInfo?.Invoke(ObjectIocContainer[NamespaceAndClassNameType.FullName], ParamTypeConvert(MethodData.MethodParam, methodInfo));
-                                            }
-                                        }
-                                        else
-                                        {
-                                            return Break("Init", false, $"{DllData.DllPath} -> {NamespaceData.Namespace}.{ClassData.ClassName} -> {MethodData.MethodName} 方法不存在");
-                                        }
-                                    }
-                                }
-                                if (ClassData.EventDatas != null)
-                                {
-                                    //遍历事件
-                                    foreach (var EventData in ClassData.EventDatas)
-                                    {
-                                        //获取方法
-                                        EventInfo? eventInfo = NamespaceAndClassNameType.GetEvent(EventData.EventName);
-                                        if (eventInfo != null)
-                                        {
-                                            //结果数据
-                                            ReflectionEventResult reflectResult = new ReflectionEventResult()
-                                            {
-                                                InstanceObject = ObjectIocContainer[NamespaceAndClassNameType.FullName],
-                                                Event = eventInfo
-                                            };
-                                            //存在直接更新,不存在新增
-                                            EventIocContainer.AddOrUpdate($"{ClassData.SN}{EventData.SN}", reflectResult, (K, V) => reflectResult);
-                                        }
-                                        else
-                                        {
-                                            return Break("Init", false, $"{DllData.DllPath} -> {NamespaceData.Namespace}.{ClassData.ClassName} -> {EventData.EventName} 事件不存在");
-                                        }
-                                    }
-                                }
-                            }
-                            else
-                            {
-                                return Break("Init", false, $"请检查 {DllData.DllPath} -> {NamespaceData.Namespace}.{ClassData.ClassName} 类名的准确性");
-                            }
-                        }
-                    }
-                }
-                ReflectionState = true;
-                return Break("Init", true, "反射初始化成功", MethodIocContainer);
-            }
-            catch (Exception ex)
-            {
-                return Break("Init", false, ex.Message, Exception: ex);
-            }
-        }
-
-        /// <summary>
-        /// 创建实例
-        /// </summary>
-        /// <param name="NamespaceAndClassNameType">类型</param>
-        /// <param name="ConstructorParam">构造函数入参</param>
-        /// <returns></returns>
-        private object? CreateInstance(Type? NamespaceAndClassNameType, object[]? ConstructorParam)
-        {
-            //转换后的参数
-            object[]? Param = null;
-
-            if (ConstructorParam != null)
-            {
-                //获取构造函数信息
-                ConstructorInfo? constructorInfo = NamespaceAndClassNameType?.GetConstructors().FirstOrDefault();
-                //数据类型转换
-                Param = ParamTypeConvert(ConstructorParam, constructorInfo);
-            }
-            //创建实例
-            return Activator.CreateInstance(NamespaceAndClassNameType, Param);
-        }
-
-        /// <summary>
-        /// 无参初始化
-        /// </summary>
-        /// <returns></returns>
-        private OperateResult Init()
-        {
-            if (this.basics != null)
-            {
-                return Init(this.basics);
-            }
-            return Break(Depart("Init"), false, "请设置反射DLL配置");
-        }
-
-        /// <summary>
-        /// 参数类型转换
-        /// </summary>
-        /// <returns></returns>
-        private object[]? ParamTypeConvert(object[] Data, object Info)
-        {
-            if (Data != null)
-            {
-                ParameterInfo[]? ParamArray = null;
-                List<object> param = new List<object>();
-                if (Info.GetType().ToString().Contains("MethodInfo"))
-                {
-                    ParamArray = (Info as MethodInfo).GetParameters();
-                    if (ParamArray != null)
-                    {
-                        for (int i = 0; i < ParamArray.Count(); i++)
-                        {
-                            if (string.IsNullOrEmpty(ParamArray[i].ParameterType.FullName))
-                            {
-                                param.Add(Data[i]);
-                            }
-                            else
-                            {
-                                param.Add(Convert.ChangeType(Data[i], ParamArray[i].ParameterType));
-                            }
-                        }
-                    }
-                }
-                if (Info.GetType().ToString().Contains("ConstructorInfo"))
-                {
-                    ParamArray = (Info as ConstructorInfo).GetParameters();
-                    if (ParamArray != null)
-                    {
-                        for (int i = 0; i < ParamArray.Count(); i++)
-                        {
-                            object? model = Activator.CreateInstance(ParamArray[i].ParameterType);
-                            PropertyInfo[] properties = ParamArray[i].ParameterType.GetProperties();
-                            foreach (var propertie in properties)
-                            {
-                                JObject? JsonObject = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(Data[i].ToJson());
-                                propertie.SetValue(model, Convert.ChangeType(JsonObject[propertie.Name], propertie.PropertyType));
-                            }
-                            if (model != null)
-                            {
-                                param.Add(model);
-                            }
-                        }
-                    }
-                }
-                if (param.Count > 0)
-                {
-                    return param.ToArray();
-                }
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// 执行方法
-        /// </summary>
-        /// <param name="SN">方法的唯一标识符</param>
-        /// <param name="MethodParam">方法参数</param>
-        /// <returns></returns>
-        public object? ExecuteMethod(string? SN, object[]? MethodParam = null)
-        {
-            ReflectionMethodResult? reflectionMethodResult = GetMethod(SN);
-
-            if (reflectionMethodResult != null)
-            {
-                //转换后的参数
-                object[]? Param = ParamTypeConvert(MethodParam, reflectionMethodResult.Method);
-
-                //返回执行结果
-                return reflectionMethodResult.Method?.Invoke(reflectionMethodResult.InstanceObject, Param);
-            }
-            else
-            {
-                return Break(Depart("ExecuteMethod"), false, "执行失败,未找到反射的数据");
-            }
-        }
-
-        /// <summary>
-        /// 获取所有方法
-        /// </summary>
-        /// <returns></returns>
-        public ConcurrentDictionary<string, ReflectionMethodResult>? GetMethod()
-        {
-            if (MethodIocContainer != null && MethodIocContainer.Count > 0)
-            {
-                return MethodIocContainer;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// 获取指定SN的方法
-        /// </summary>
-        /// <returns></returns>
-        public ReflectionMethodResult? GetMethod(string SN)
-        {
-            if (MethodIocContainer != null && MethodIocContainer.Count > 0)
-            {
-                return MethodIocContainer[SN];
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// /// <summary>
-        /// 注册事件
-        /// </summary>
-        /// <param name="SN">唯一标识符</param>
-        /// <param name="Register">是否注册 ,true 注册 false 移除</param>
-        /// <param name="P1">一个参数的事件动作</param>
-        /// <param name="P2">二个参数的事件动作</param>
-        /// <param name="P3">三个参数的事件动作</param>
-        /// <param name="P4">四个参数的事件动作</param>
-        /// <param name="P5">五个参数的事件动作</param>
-        /// <param name="P6">六个参数的事件动作</param>
-        /// <returns></returns>
-        public OperateResult RegisterEvent(string SN, bool Register,
-            Action<object>? P1 = null,
-            Action<object, object>? P2 = null,
-            Action<object, object, object>? P3 = null,
-            Action<object, object, object, object>? P4 = null,
-            Action<object, object, object, object, object>? P5 = null,
-            Action<object, object, object, object, object, object>? P6 = null)
-        {
-            Depart("RegisterEvent");
-            ReflectionEventResult? reflectionEventResult = GetEvent(SN);
-            if (reflectionEventResult != null)
-            {
-                if (reflectionEventResult.Event.EventHandlerType != null)
-                {
-                    Delegate? @delegate = null;
-                    if (P1 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P1.Target, P1.Method);
-                    }
-                    if (P2 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P2.Target, P2.Method);
-                    }
-                    if (P3 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P3.Target, P3.Method);
-                    }
-                    if (P4 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P4.Target, P4.Method);
-                    }
-                    if (P5 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P5.Target, P5.Method);
-                    }
-                    if (P6 != null)
-                    {
-                        @delegate = Delegate.CreateDelegate(reflectionEventResult.Event.EventHandlerType, P6.Target, P6.Method);
-                    }
-                    if (Register)
-                    {
-                        reflectionEventResult.Event.AddEventHandler(reflectionEventResult.InstanceObject, @delegate);
-                    }
-                    else
-                    {
-                        reflectionEventResult.Event.RemoveEventHandler(reflectionEventResult.InstanceObject, @delegate);
-                    }
-                    return Break("RegisterEvent", true, "事件注册成功");
-                }
-                else
-                {
-                    return Break("RegisterEvent", false, "事件注册失败,未找到反射的数据类型");
-                }
-            }
-            else
-            {
-                return Break("RegisterEvent", false, "事件注册失败,未找到反射的数据");
-            }
-        }
-
-        /// <summary>
-        /// 获取反射的实例
-        /// </summary>
-        /// <param name="SN"></param>
-        /// <returns></returns>
-        public object? ReflectionInstance(string SN = "YSAI.RelayManage.RelayManageOperate")
-        {
-            if (ObjectIocContainer.Count > 0)
-            {
-                return ObjectIocContainer[SN];
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// 获取所有事件
-        /// </summary>
-        /// <returns></returns>
-        public ConcurrentDictionary<string, ReflectionEventResult>? GetEvent()
-        {
-            if (EventIocContainer != null && EventIocContainer.Count > 0)
-            {
-                return EventIocContainer;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// 获取指定SN的事件
-        /// </summary>
-        /// <returns></returns>
-        public ReflectionEventResult? GetEvent(string SN)
-        {
-            if (EventIocContainer != null && EventIocContainer.Count > 0)
-            {
-                return EventIocContainer[SN];
-            }
-            return null;
-        }
-
-        public void Dispose()
-        {
-            ReflectionState = false;
-            ObjectIocContainer.Clear();
-            MethodIocContainer.Clear();
-            EventIocContainer.Clear();
-            GC.Collect();
-            GC.SuppressFinalize(this);
-            ThisObjList = null;
-        }
-    }
-}

+ 12 - 0
src/YSAI.Core/relay/Class1.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace YSAI.Core.relay
+{
+    internal class Class1
+    {
+    }
+}

+ 7 - 7
src/YSAI.Core/subscribe/SubscribeData.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
-using YSAI.Core.data;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.Core.subscription
@@ -43,7 +43,7 @@ namespace YSAI.Core.subscription
             /// </summary>
             [Description("处理间隔")]
             [Unit("ms")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int HandleInterval { get; set; } = 1000;
 
             /// <summary>
@@ -52,7 +52,7 @@ namespace YSAI.Core.subscription
             /// 数据库查询,此项无效
             /// </summary>
             [Description("变化抛出")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.radio)]
+            [Display(true, true, true, ParamStructure.dataCate.radio)]
             public bool ChangeOut { get; set; } = true;
 
             /// <summary>
@@ -61,14 +61,14 @@ namespace YSAI.Core.subscription
             /// 数据库查询,此项无效
             /// </summary>
             [Description("未变项与变化项一同抛出")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.radio)]
+            [Display(true, true, true, ParamStructure.dataCate.radio)]
             public bool AllOut { get; set; } = false;
 
             /// <summary>
             /// 任务数量
             /// </summary>
             [Description("任务数量")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int TaskNumber { get; set; } = 5;
 
             /// <summary>
@@ -76,7 +76,7 @@ namespace YSAI.Core.subscription
             /// </summary>
             [Description("任务处理间隔")]
             [Unit("ms")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int TaskHandleInterval { get; set; } = 100;
         }
     }

+ 3 - 3
src/YSAI.Core/subscribe/SubscribeOperate.cs

@@ -1,8 +1,8 @@
 using System.Collections.Concurrent;
-using YSAI.Core.data;
-using YSAI.Core.@enum;
-using YSAI.Core.@interface;
 using YSAI.Core.subscribe.core;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.subscription

+ 2 - 2
src/YSAI.Core/subscribe/core/SubscribeService.cs

@@ -1,6 +1,6 @@
 using System.Collections.Concurrent;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@interface;
 
 namespace YSAI.Core.subscribe.core
 {

+ 5 - 4
src/YSAI.Core/subscribe/core/SubscribeSource.cs

@@ -1,5 +1,6 @@
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.subscribe.core
@@ -48,7 +49,7 @@ namespace YSAI.Core.subscribe.core
             if (!Data.Comparer(Source, new string[] { "Time" }).result)
             {
                 Source = Data;
-                OnEventHandler(this, new EventResult(true, "Data Update", this, @enum.ResultType.Object));
+                OnEventHandler(this, new EventResult(true, "Data Update", this, ResultType.Object));
             }
             return Break("Set", true);
         }
@@ -70,7 +71,7 @@ namespace YSAI.Core.subscribe.core
         /// <returns>设置的啥类型,返回啥类型</returns>
         public OperateResult Get()
         {
-            return Break(Depart("Get"), true, "Get Succeed", this, @enum.ResultType.Object);
+            return Break(Depart("Get"), true, "Get Succeed", this, ResultType.Object);
         }
 
         /// <summary>

+ 2 - 2
src/YSAI.Core/virtualAddress/VirtualAddress.cs

@@ -1,5 +1,5 @@
-using YSAI.Core.@enum;
-using YSAI.Core.@interface;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.virtualAddress

+ 1 - 1
src/YSAI.Core/virtualAddress/VirtualAddressData.cs

@@ -1,6 +1,6 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
-using YSAI.Core.@enum;
+using YSAI.Model.@enum;
 
 namespace YSAI.Core.virtualAddress
 {

+ 2 - 2
src/YSAI.Core/virtualAddress/VirtualAddressManage.cs

@@ -1,6 +1,6 @@
 using System.Collections.Concurrent;
-using YSAI.Core.data;
-using YSAI.Core.@enum;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
 
 namespace YSAI.Core.virtualAddress
 {

+ 26 - 5
src/YSAI.DAQ.sln

@@ -131,7 +131,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Test.RPC.Server", "YSA
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Test.RPC.Client", "YSAI.Test.RPC.Client\YSAI.Test.RPC.Client.csproj", "{E3F6DC4A-57F4-436F-86C5-6B2F782AA2C9}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YSAI.Redis", "YSAI.Redis\YSAI.Redis.csproj", "{F917D5C2-A067-47F3-8E18-1CD2C95FEC29}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Redis", "YSAI.Redis\YSAI.Redis.csproj", "{F917D5C2-A067-47F3-8E18-1CD2C95FEC29}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Model", "YSAI.Model\YSAI.Model.csproj", "{2E999BFE-9128-4BAD-9BB5-88C20295BE61}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Reflection", "YSAI.Reflection\YSAI.Reflection.csproj", "{EA604662-0943-4F77-9840-10F770FB0946}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Script", "YSAI.Script\YSAI.Script.csproj", "{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -359,14 +365,26 @@ Global
 		{F917D5C2-A067-47F3-8E18-1CD2C95FEC29}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{F917D5C2-A067-47F3-8E18-1CD2C95FEC29}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{F917D5C2-A067-47F3-8E18-1CD2C95FEC29}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2E999BFE-9128-4BAD-9BB5-88C20295BE61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2E999BFE-9128-4BAD-9BB5-88C20295BE61}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2E999BFE-9128-4BAD-9BB5-88C20295BE61}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2E999BFE-9128-4BAD-9BB5-88C20295BE61}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EA604662-0943-4F77-9840-10F770FB0946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EA604662-0943-4F77-9840-10F770FB0946}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EA604662-0943-4F77-9840-10F770FB0946}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EA604662-0943-4F77-9840-10F770FB0946}.Release|Any CPU.Build.0 = Release|Any CPU
+		{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
 		{859336BA-B7A8-45E7-BE35-72B1BB7D01B7} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
-		{3D1D4ACF-EFD0-497D-891D-527BDE7CA9A4} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
-		{C8EEBF30-365E-4F22-A58C-C68FB58E4256} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
+		{3D1D4ACF-EFD0-497D-891D-527BDE7CA9A4} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
+		{C8EEBF30-365E-4F22-A58C-C68FB58E4256} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
 		{FEA383F4-9CDD-422F-9068-200A66DF7C81} = {0A264424-1AD7-49FA-B813-D96498066479}
 		{1EE30939-69BA-4F20-96B3-D4082C937924} = {9D8EDBBA-7A97-4D84-9B12-7FCC2F834046}
 		{FEFEFB3E-30EE-429A-B39D-F39CF1338E38} = {0A264424-1AD7-49FA-B813-D96498066479}
@@ -384,7 +402,7 @@ Global
 		{D7FFC9F4-1248-469D-BAF9-AD675BF83A92} = {6F526F44-A5B0-49D5-8E04-DBFDB5F8E6C6}
 		{6A255A65-3198-44AA-A281-62F721D49CEF} = {6F526F44-A5B0-49D5-8E04-DBFDB5F8E6C6}
 		{0EA9373C-B55A-4400-82AC-7681AA996229} = {6F526F44-A5B0-49D5-8E04-DBFDB5F8E6C6}
-		{257F1474-B220-4C61-88C6-5B83BEF7B3A7} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
+		{257F1474-B220-4C61-88C6-5B83BEF7B3A7} = {6F526F44-A5B0-49D5-8E04-DBFDB5F8E6C6}
 		{9D8EDBBA-7A97-4D84-9B12-7FCC2F834046} = {7EB5153B-7702-4D7B-8592-FE6D992682AB}
 		{41AB3A5A-5372-4A75-898C-9A4F9454F8A5} = {ECAD410C-2895-4836-BCA7-D4EF340E778E}
 		{DD9020DC-A51F-48F2-83FA-A3F10A43220F} = {ECAD410C-2895-4836-BCA7-D4EF340E778E}
@@ -419,11 +437,14 @@ Global
 		{1F68D7B4-3565-4278-A207-8724303EEF60} = {0A264424-1AD7-49FA-B813-D96498066479}
 		{A9D6C2E8-E8B0-482B-ABBD-BEBA119AB89A} = {1EBA4FD7-DF52-49A0-8AA4-9E61ABC614F5}
 		{18BC89C3-3247-413C-9199-934741507CA0} = {1856E9E1-33C4-45C1-832C-854F9BE1ACC4}
-		{F23C3553-3FE7-4ECC-9BBA-8C498C3B4398} = {7EB5153B-7702-4D7B-8592-FE6D992682AB}
+		{F23C3553-3FE7-4ECC-9BBA-8C498C3B4398} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
 		{87606DDA-82DA-4BCD-87B3-E7CEFB05EADC} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
 		{30AB5928-8D59-4D35-8866-D42EF3273433} = {12CB0510-7B1E-4518-AA3B-412A4D323D42}
 		{E3F6DC4A-57F4-436F-86C5-6B2F782AA2C9} = {12CB0510-7B1E-4518-AA3B-412A4D323D42}
 		{F917D5C2-A067-47F3-8E18-1CD2C95FEC29} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
+		{2E999BFE-9128-4BAD-9BB5-88C20295BE61} = {D60224CF-7F12-453B-851E-B5C01F9D2BBE}
+		{EA604662-0943-4F77-9840-10F770FB0946} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
+		{80FE38E7-6534-4C54-A4E6-B4DE43BD557F} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5D5D3927-6714-40C0-84EA-44C5BA4C5E87}

+ 1 - 1
src/YSAI.DB/YSAI.DB.csproj

@@ -16,7 +16,7 @@
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
   </PropertyGroup>
   <ItemGroup>
-    <PackageReference Include="Dapper" Version="2.1.21" />
+    <PackageReference Include="Dapper" Version="2.1.24" />
     <PackageReference Include="MySql.Data" Version="8.2.0" />
     <PackageReference Include="System.Data.OracleClient" Version="1.0.8" />
     <PackageReference Include="System.Data.SqlClient" Version="4.8.5" />

+ 6 - 5
src/YSAI.Kafka/KafkaData.cs

@@ -2,7 +2,8 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.Kafka
@@ -30,14 +31,14 @@ namespace YSAI.Kafka
             /// 服务器地址
             /// </summary>
             [Description("服务器地址")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? BootstrapServers { get; set; }
 
             /// <summary>
             /// 最多等待时间(毫秒)
             /// </summary>
             [Description("等待时间")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int WaitTime { get; set; } = 1000;
 
             /// <summary>
@@ -45,7 +46,7 @@ namespace YSAI.Kafka
             /// </summary>
             [Description("安全协议")]
             [JsonConverter(typeof(StringEnumConverter))]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.select)]
+            [Display(true, true, true, ParamStructure.dataCate.select)]
             public SecurityProtocol SecurityProtocol { get; set; } = SecurityProtocol.Plaintext;
 
             /// <summary>
@@ -53,7 +54,7 @@ namespace YSAI.Kafka
             /// </summary>
             [Description("自动偏移复位")]
             [JsonConverter(typeof(StringEnumConverter))]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.select)]
+            [Display(true, true, true, ParamStructure.dataCate.select)]
             public AutoOffsetReset AutoOffsetReset { get; set; } = AutoOffsetReset.Latest;
         }
     }

+ 7 - 6
src/YSAI.Kafka/KafkaOperate.cs

@@ -1,8 +1,9 @@
 using Confluent.Kafka;
 using Confluent.Kafka.Admin;
-using YSAI.Core.data;
-using YSAI.Core.handler;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
+using YSAI.Model.tool;
 using YSAI.Unility;
 
 namespace YSAI.Kafka
@@ -134,11 +135,11 @@ namespace YSAI.Kafka
                             long Offset = result.TopicPartitionOffset.Offset.Value;
                             if (Content.IsJson())
                             {
-                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} ) 键 ( {Key} ) 偏移量 ( {Offset} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content},\"Key\":\"{Key}\",\"Offset\":\"{Offset}\"" + "}", Core.@enum.ResultType.Dynamic));
+                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} ) 键 ( {Key} ) 偏移量 ( {Offset} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content},\"Key\":\"{Key}\",\"Offset\":\"{Offset}\"" + "}", ResultType.Dynamic));
                             }
                             else
                             {
-                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} ) 键 ( {Key} ) 偏移量 ( {Offset} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\",\"Key\":\"{Key}\",\"Offset\":\"{Offset}\"" + "}", Core.@enum.ResultType.Dynamic));
+                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} ) 键 ( {Key} ) 偏移量 ( {Offset} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\",\"Key\":\"{Key}\",\"Offset\":\"{Offset}\"" + "}", ResultType.Dynamic));
                             }
                             //消息已处理提交偏移量
                             Consumer?.Commit(result);
@@ -517,7 +518,7 @@ namespace YSAI.Kafka
                 //命名空间
                 string nameSpace = "YSAI.Kafka.KafkaOperate";
                 //参数处理
-                OperateResult operateResult = ParamHandler.Get(new KafkaData.Basics(), name, Properties: new List<ParamStructure.propertie>
+                OperateResult operateResult = ParamTool.Get(new KafkaData.Basics(), name, Properties: new List<ParamStructure.propertie>
                 {
                     new ParamStructure.propertie
                     {

+ 1 - 1
src/YSAI.Kafka/YSAI.Kafka.csproj

@@ -17,7 +17,7 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="Confluent.Kafka" Version="2.3.0" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+	<PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
   <!--<ItemGroup>
 		<ProjectReference Include="..\YSAI.Core\YSAI.Core.csproj" />

+ 2 - 2
src/YSAI.Log/YSAI.Log.csproj

@@ -3,14 +3,14 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.319.17368</Version>
+    <Version>23.328.18305</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
     <Company>YSAI</Company>
     <Product>SCADA</Product>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
-    <DescriptionType>核心组件</DescriptionType>
+    <DescriptionType>扩展工具</DescriptionType>
     <DescriptionName>Log</DescriptionName>
     <DescriptionDetails>Verbose [详细信息]、Debug [调试]、Info [信息]、Warning [警告]、Error [异常或错误]、Fatal [致命错误或异常]</DescriptionDetails>
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>

+ 22 - 0
src/YSAI.Model/YSAI.Model.csproj

@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>enable</Nullable>
+    <Version>23.328.22745</Version>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
+    <Authors>Shun</Authors>
+    <Company>YSAI</Company>
+    <Product>SCADA</Product>
+    <GenerateDocumentationFile>True</GenerateDocumentationFile>
+    <DescriptionType>核心组件</DescriptionType>
+    <DescriptionName>Model</DescriptionName>
+    <DescriptionDetails>特性、数据结构、接口、枚举</DescriptionDetails>
+    <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="YSAI.Log" Version="23.328.18305" />
+    <PackageReference Include="YSAI.Unility" Version="23.328.18305" />
+  </ItemGroup>
+</Project>

+ 3 - 3
src/YSAI.Core/attribute/DisplayAttribute.cs

@@ -1,7 +1,7 @@
-using YSAI.Core.data;
-using static YSAI.Core.data.ParamStructure;
+using YSAI.Model.data;
+using static YSAI.Model.data.ParamStructure;
 
-namespace YSAI.Core.attribute
+namespace YSAI.Model.attribute
 {
     /// <summary>
     /// 展示特性

+ 1 - 1
src/YSAI.Core/attribute/UnitAttribute.cs

@@ -1,4 +1,4 @@
-namespace YSAI.Core.attribute
+namespace YSAI.Model.attribute
 {
     /// <summary>
     /// 单位特性

+ 1 - 1
src/YSAI.Core/attribute/VerifyAttribute.cs

@@ -1,4 +1,4 @@
-namespace YSAI.Core.attribute
+namespace YSAI.Model.attribute
 {
     /// <summary>
     /// 验证特性

+ 1 - 1
src/YSAI.Core/data/Address.cs

@@ -1,6 +1,6 @@
 using YSAI.Unility;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 地址,包含多个地址

+ 20 - 14
src/YSAI.Core/data/AddressDetails.cs

@@ -1,9 +1,9 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
-using YSAI.Core.@enum;
+using YSAI.Model.@enum;
 using YSAI.Unility;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 单个地址的详细信息
@@ -16,9 +16,9 @@ namespace YSAI.Core.data
         public string? SN { get; set; }
 
         /// <summary>
-        /// 唯一
-        /// 实际的点位地址名称
-        /// 是扩展数据时,可为空
+        /// 唯一
+        /// 实际的点位地址名称
+        /// 是扩展数据时,可为空
         /// 不是扩展数据时,此项为PLC的地址
         /// </summary>
         public string? AddressName { get; set; }
@@ -29,8 +29,8 @@ namespace YSAI.Core.data
         public string? AddressAnotherName { get; set; }
 
         /// <summary>
-        /// 地址属性名称(与定义的实体名称对应)
-        /// 是扩展数据时,可为空
+        /// 地址属性名称(与定义的实体名称对应)
+        /// 是扩展数据时,可为空
         /// 不是扩展数据时,此项为PLC的最后字段名
         /// </summary>
         public string? AddressPropertyName { get; set; }
@@ -40,12 +40,6 @@ namespace YSAI.Core.data
         /// </summary>
         public string? AddressDescribe { get; set; }
 
-        /// <summary>
-        /// 地址数据解析
-        /// 此点位的数据是否需要通过指定类型来进行解析
-        /// </summary>
-        public AddressParse? AddressParseParam { get; set; }
-
         /// <summary>
         /// 指定通信的扩展数据
         /// </summary>
@@ -56,6 +50,18 @@ namespace YSAI.Core.data
         /// </summary>
         public bool IsEnable { get; set; } = true;
 
+        /// <summary>
+        /// 数据转发;
+        /// 转发的配置JSON字符串
+        /// </summary>
+        public string? RelayConfig { get; set; }
+
+        /// <summary>
+        /// 数据解析;
+        /// 解析的配置JSON字符串
+        /// </summary>
+        public string? ParseConfig { get; set; }
+
         /// <summary>
         /// 数据类型
         /// </summary>
@@ -71,7 +77,7 @@ namespace YSAI.Core.data
         /// <summary>
         /// 重写Equals
         /// </summary>
-        /// <param name="o"></param>
+        /// <param name="o">对象</param>
         /// <returns></returns>
         public override bool Equals(object o)
         {

+ 4 - 4
src/YSAI.Core/data/AddressParse.cs

@@ -1,9 +1,8 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
-using YSAI.Core.@enum;
-using YSAI.Core.script;
+using YSAI.Model.@enum;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 地址的解析
@@ -23,7 +22,8 @@ namespace YSAI.Core.data
 
         /// <summary>
         /// 通过脚本来执行解析
+        /// 脚本基础数据对象
         /// </summary>
-        public ScriptData.Basics Script { get; set; }
+        public object ScriptBasics { get; set; }
     }
 }

+ 4 - 3
src/YSAI.Core/data/AddressValue.cs

@@ -1,6 +1,6 @@
 using YSAI.Unility;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 地址获取到的值
@@ -40,7 +40,8 @@ namespace YSAI.Core.data
             this.AddressAnotherName = addressDetails.AddressAnotherName;
             this.AddressPropertyName = addressDetails.AddressPropertyName;
             this.AddressDescribe = addressDetails.AddressDescribe;
-            this.AddressParseParam = addressDetails.AddressParseParam;
+            this.ParseConfig = addressDetails.ParseConfig;
+            this.RelayConfig = addressDetails.RelayConfig;
             this.AddressExtendParam = addressDetails.AddressExtendParam;
             this.IsEnable = addressDetails.IsEnable;
             this.AddressDataType = addressDetails.AddressDataType;
@@ -51,7 +52,7 @@ namespace YSAI.Core.data
         /// <summary>
         /// 重写Equals
         /// </summary>
-        /// <param name="o"></param>
+        /// <param name="o">对象</param>
         /// <returns></returns>
         public override bool Equals(object o)
         {

+ 2 - 2
src/YSAI.Core/data/EventResult.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.@enum;
+using YSAI.Model.@enum;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 事件结果

+ 2 - 2
src/YSAI.Core/data/OperateResult.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.@enum;
+using YSAI.Model.@enum;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 操作结果

+ 1 - 1
src/YSAI.Core/data/ParamStructure.cs

@@ -1,7 +1,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     /// <summary>
     /// 库文件参数结构

+ 2 - 2
src/YSAI.Core/data/Result.cs

@@ -1,9 +1,9 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
-using YSAI.Core.@enum;
+using YSAI.Model.@enum;
 using YSAI.Unility;
 
-namespace YSAI.Core.data
+namespace YSAI.Model.data
 {
     public class Result
     {

+ 1 - 1
src/YSAI.Core/enum/AddressType.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel;
 
-namespace YSAI.Core.@enum
+namespace YSAI.Model.@enum
 {
     /// <summary>
     /// 地址类型

+ 1 - 1
src/YSAI.Core/enum/DataType.cs

@@ -1,6 +1,6 @@
 using System.ComponentModel;
 
-namespace YSAI.Core.@enum
+namespace YSAI.Model.@enum
 {
     /// <summary>
     /// 数据类型

+ 1 - 1
src/YSAI.Core/enum/ParseType.cs

@@ -1,4 +1,4 @@
-namespace YSAI.Core.@enum
+namespace YSAI.Model.@enum
 {
     /// <summary>
     /// 解析类型

+ 1 - 1
src/YSAI.Core/enum/ResultType.cs

@@ -1,4 +1,4 @@
-namespace YSAI.Core.@enum
+namespace YSAI.Model.@enum
 {
     /// <summary>
     /// 结果数据类型

+ 2 - 2
src/YSAI.Core/interface/IBaseAbstract.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// [ 抽象类 ]包含一个事件与统一出参

+ 1 - 1
src/YSAI.Core/interface/ICommunication.cs

@@ -1,4 +1,4 @@
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 底层通信接口

+ 2 - 2
src/YSAI.Core/interface/IConsumer.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 消费者接口

+ 2 - 2
src/YSAI.Core/interface/ICreateInstance.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 创建实例接口(单例模式)

+ 2 - 2
src/YSAI.Core/interface/IDaq.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.@internal;
+using YSAI.Model.@internal;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 数采接口

+ 2 - 2
src/YSAI.Core/interface/IEvent.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 事件接口

+ 2 - 2
src/YSAI.Core/interface/IGetObject.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 获取对象

+ 2 - 2
src/YSAI.Core/interface/IGetParam.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@internal
+namespace YSAI.Model.@internal
 {
     /// <summary>
     /// 获取参数接口

+ 2 - 2
src/YSAI.Core/interface/IGetStatus.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 获取状态

+ 2 - 2
src/YSAI.Core/interface/IOff.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 关闭接口

+ 2 - 2
src/YSAI.Core/interface/IOn.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 打开接口

+ 2 - 2
src/YSAI.Core/interface/IOrAbstract.cs

@@ -1,8 +1,8 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 using YSAI.Log;
 using YSAI.Unility;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 抽象类,实现统一返回

+ 2 - 2
src/YSAI.Core/interface/IProducer.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 生产者接口

+ 2 - 2
src/YSAI.Core/interface/IRead.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 读取接口

+ 2 - 2
src/YSAI.Core/interface/IRelay.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.@internal;
+using YSAI.Model.@internal;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 转发接口

+ 2 - 2
src/YSAI.Core/interface/ISend.cs

@@ -1,7 +1,7 @@
 using System.Net;
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 发送

+ 2 - 2
src/YSAI.Core/interface/ISendWait.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 发送等待

+ 2 - 2
src/YSAI.Core/interface/ISubscribe.cs

@@ -1,6 +1,6 @@
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 自定义订阅接口

+ 2 - 2
src/YSAI.Core/interface/IWrite.cs

@@ -1,7 +1,7 @@
 using System.Collections.Concurrent;
-using YSAI.Core.data;
+using YSAI.Model.data;
 
-namespace YSAI.Core.@interface
+namespace YSAI.Model.@interface
 {
     /// <summary>
     /// 写入接口

+ 11 - 13
src/YSAI.Core/handler/ParamHandler.cs

@@ -1,14 +1,12 @@
 using System.Reflection;
-using YSAI.Core.attribute;
-using YSAI.Core.data;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
 using YSAI.Unility;
 
-namespace YSAI.Core.handler
+namespace YSAI.Model.tool
 {
-    /// <summary>
-    /// 参数处理
-    /// </summary>
-    public class ParamHandler
+    public class ParamTool
     {
         /// <summary>
         /// 子类数据
@@ -117,7 +115,7 @@ namespace YSAI.Core.handler
 
                         switch (displayAttribute?.DataCate)
                         {
-                            case Core.data.ParamStructure.dataCate.select:
+                            case ParamStructure.dataCate.select:
                                 propertie.Options = new List<ParamStructure.options>();
                                 foreach (var val in lib.EnumArray as List<dynamic>)
                                 {
@@ -134,7 +132,7 @@ namespace YSAI.Core.handler
                                 }
                                 break;
 
-                            case Core.data.ParamStructure.dataCate.radio:
+                            case ParamStructure.dataCate.radio:
                                 propertie.Options = new List<ParamStructure.options>();
                                 propertie.Options.Add(new ParamStructure.options
                                 {
@@ -175,7 +173,7 @@ namespace YSAI.Core.handler
                         paramStructure.Subset[0].Propertie.AddRange(Properties);
                     }
 
-                    return new OperateResult(true, paramStructure.ToJson().JsonFormatting(), timeTool.StopRecord().milliseconds, paramStructure, Core.@enum.ResultType.Object);
+                    return new OperateResult(true, paramStructure.ToJson().JsonFormatting(), timeTool.StopRecord().milliseconds, paramStructure, ResultType.Object);
                 }
                 else
                 {
@@ -229,7 +227,7 @@ namespace YSAI.Core.handler
                             };
                             switch (displayAttribute?.DataCate)
                             {
-                                case Core.data.ParamStructure.dataCate.select:
+                                case ParamStructure.dataCate.select:
                                     propertie.Options = new List<ParamStructure.options>();
                                     foreach (var val in lib.EnumArray as List<dynamic>)
                                     {
@@ -246,7 +244,7 @@ namespace YSAI.Core.handler
                                     }
                                     break;
 
-                                case Core.data.ParamStructure.dataCate.radio:
+                                case ParamStructure.dataCate.radio:
                                     propertie.Options = new List<ParamStructure.options>();
                                     propertie.Options.Add(new ParamStructure.options
                                     {
@@ -285,7 +283,7 @@ namespace YSAI.Core.handler
                             paramStructure.Subset[i].Propertie.AddRange(subclass[i].Properties);
                         }
                     }
-                    return new OperateResult(true, paramStructure.ToJson().JsonFormatting(), timeTool.StopRecord().milliseconds, paramStructure, Core.@enum.ResultType.Object);
+                    return new OperateResult(true, paramStructure.ToJson().JsonFormatting(), timeTool.StopRecord().milliseconds, paramStructure, ResultType.Object);
                 }
             }
             catch (Exception ex)

+ 1 - 1
src/YSAI.Mqtt/YSAI.Mqtt.csproj

@@ -18,7 +18,7 @@
   <ItemGroup>
     <PackageReference Include="MQTTnet" Version="4.3.1.873" />
     <PackageReference Include="MQTTnet.AspNetCore" Version="4.3.1.873" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+	<PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
   <!--<ItemGroup>
 		<ProjectReference Include="..\YSAI.Core\YSAI.Core.csproj" />

+ 8 - 7
src/YSAI.Mqtt/client/MqttClientData.cs

@@ -2,7 +2,8 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.Mqtt.client
@@ -28,28 +29,28 @@ namespace YSAI.Mqtt.client
             /// </summary>
             [Description("IP地址")]
             [Verify(@"^(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-5]|2[0-4]\\d]|[01]?\\d?\\d)\\.(25[0-4]|2[0-4]\\d]|[01]?\\d{2}|[1-9])$", "输入有误")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? Ip { get; set; }
 
             /// <summary>
             /// 端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// 用户
             /// </summary>
             [Description("用户名")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? UserName { get; set; }
 
             /// <summary>
             /// 密码
             /// </summary>
             [Description("密码")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? Password { get; set; }
 
             /// <summary>
@@ -57,7 +58,7 @@ namespace YSAI.Mqtt.client
             /// 不输入默认生成随机
             /// </summary>
             [Description("客户端ID")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? ClientID { get; set; }
 
             /// <summary>
@@ -69,7 +70,7 @@ namespace YSAI.Mqtt.client
             /// </summary>
             [Description("QoS等级")]
             [JsonConverter(typeof(StringEnumConverter))]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.select)]
+            [Display(true, true, false, ParamStructure.dataCate.select)]
             public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; } = MqttQualityOfServiceLevel.AtMostOnce;
         }
     }

+ 7 - 6
src/YSAI.Mqtt/client/MqttClientOperate.cs

@@ -2,9 +2,10 @@
 using MQTTnet.Client;
 using MQTTnet.Protocol;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.handler;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
+using YSAI.Model.tool;
 using YSAI.Unility;
 
 namespace YSAI.Mqtt.client
@@ -104,11 +105,11 @@ namespace YSAI.Mqtt.client
                 string ClientID = arg.ClientId;
                 if (Content.IsJson())
                 {
-                    OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content},\"ClientID\":\"{ClientID}\"" + "}", Core.@enum.ResultType.Dynamic));
+                    OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content},\"ClientID\":\"{ClientID}\"" + "}", ResultType.Dynamic));
                 }
                 else
                 {
-                    OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\",\"ClientID\":\"{ClientID}\"" + "}", Core.@enum.ResultType.Dynamic));
+                    OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\",\"ClientID\":\"{ClientID}\"" + "}", ResultType.Dynamic));
                 }
             });
         }
@@ -405,7 +406,7 @@ namespace YSAI.Mqtt.client
                 //命名空间
                 string nameSpace = "YSAI.Mqtt.client.MqttClientOperate";
                 //参数处理
-                OperateResult operateResult = ParamHandler.Get(new MqttClientData.Basics(), name, Properties: new List<ParamStructure.propertie>
+                OperateResult operateResult = ParamTool.Get(new MqttClientData.Basics(), name, Properties: new List<ParamStructure.propertie>
                 {
                     new ParamStructure.propertie
                     {

+ 6 - 5
src/YSAI.Mqtt/service/MqttServiceData.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 
 namespace YSAI.Mqtt.service
 {
@@ -17,28 +18,28 @@ namespace YSAI.Mqtt.service
             /// 端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// 用户
             /// </summary>
             [Description("用户名")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? UserName { get; set; }
 
             /// <summary>
             /// 密码
             /// </summary>
             [Description("密码")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? Password { get; set; }
 
             /// <summary>
             /// 最大连接数
             /// </summary>
             [Description("最大连接数")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public int MaxNumber { get; set; } = 10000;
         }
 

+ 10 - 9
src/YSAI.Mqtt/service/MqttServiceOperate.cs

@@ -2,8 +2,9 @@
 using MQTTnet.Server;
 using System.Dynamic;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 using static YSAI.Mqtt.service.MqttServiceData;
 
@@ -116,7 +117,7 @@ namespace YSAI.Mqtt.service
         {
             return Task.Run(() =>
             {
-                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端取消订阅事件} ]( {arg.ClientId} ) 取消了 ( {arg.TopicFilter} ) 的订阅", arg.ClientId, Core.@enum.ResultType.String));
+                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端取消订阅事件} ]( {arg.ClientId} ) 取消了 ( {arg.TopicFilter} ) 的订阅", arg.ClientId, ResultType.String));
             });
         }
 
@@ -127,7 +128,7 @@ namespace YSAI.Mqtt.service
         {
             return Task.Run(() =>
             {
-                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端订阅事件} ]( {arg.ClientId} ) 订阅了主题 ( {arg.TopicFilter.Topic} )", arg.ClientId, Core.@enum.ResultType.String));
+                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端订阅事件} ]( {arg.ClientId} ) 订阅了主题 ( {arg.TopicFilter.Topic} )", arg.ClientId, ResultType.String));
             });
         }
 
@@ -147,7 +148,7 @@ namespace YSAI.Mqtt.service
                         dynamic DynamicObj = new ExpandoObject();
                         DynamicObj.Messages = arg.ApplicationMessage;
                         DynamicObj.SenderID = arg.SenderId;
-                        OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端消息事件} ]( {arg.SenderId} ) 发布了主题 ( {arg.ApplicationMessage.Topic} ) 内容 ( {Encoding.UTF8.GetString(arg.ApplicationMessage.Payload)} )", DynamicObj, Core.@enum.ResultType.Dynamic));
+                        OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端消息事件} ]( {arg.SenderId} ) 发布了主题 ( {arg.ApplicationMessage.Topic} ) 内容 ( {Encoding.UTF8.GetString(arg.ApplicationMessage.Payload)} )", DynamicObj, ResultType.Dynamic));
                         break;
                 }
             });
@@ -160,7 +161,7 @@ namespace YSAI.Mqtt.service
         {
             return Task.Run(() =>
             {
-                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端断开事件} ]( {arg.ClientId} ) 已断开", arg.ClientId, Core.@enum.ResultType.String));
+                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端断开事件} ]( {arg.ClientId} ) 已断开", arg.ClientId, ResultType.String));
             });
         }
 
@@ -171,7 +172,7 @@ namespace YSAI.Mqtt.service
         {
             return Task.Run(() =>
             {
-                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端连接事件} ]( {arg.ClientId} ) 已连接", arg.ClientId, Core.@enum.ResultType.String));
+                OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端连接事件} ]( {arg.ClientId} ) 已连接", arg.ClientId, ResultType.String));
             });
         }
 
@@ -189,12 +190,12 @@ namespace YSAI.Mqtt.service
                 if (!arg.UserName.Equals((string?)basics.UserName) || !arg.Password.Equals(basics.Password))
                 {
                     arg.ReasonCode = MQTTnet.Protocol.MqttConnectReasonCode.BadUserNameOrPassword;
-                    OnEventHandler(this, new EventResult(false, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证异常:{arg.ReasonCode}", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler(this, new EventResult(false, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证异常:{arg.ReasonCode}", arg.ClientId, ResultType.String));
                 }
                 else
                 {
                     arg.ReasonCode = MQTTnet.Protocol.MqttConnectReasonCode.Success;
-                    OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证成功", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler(this, new EventResult(true, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证成功", arg.ClientId, ResultType.String));
                 }
             }));
         }

+ 8 - 7
src/YSAI.Mqtt/service/websocket/MqttWebSocketServiceData.cs

@@ -1,6 +1,7 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
-using YSAI.Core.@interface;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
+using YSAI.Model.@interface;
 
 namespace YSAI.Mqtt.service.websocket
 {
@@ -24,35 +25,35 @@ namespace YSAI.Mqtt.service.websocket
             /// MQTT服务端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// 端口 Mqtt WEBSOCKET 使用
             /// </summary>
             [Description("WS端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int WsPort { get; set; }
 
             /// <summary>
             /// 用户
             /// </summary>
             [Description("用户")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? UserName { get; set; }
 
             /// <summary>
             /// 密码
             /// </summary>
             [Description("密码")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? Password { get; set; }
 
             /// <summary>
             /// 地址
             /// </summary>
             [Description("地址")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? Uri { get; set; }
         }
 

+ 10 - 9
src/YSAI.Mqtt/service/websocket/MqttWebSocketServiceOperate.cs

@@ -6,8 +6,9 @@ using MQTTnet.AspNetCore;
 using MQTTnet.Server;
 using System.Dynamic;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 using static YSAI.Mqtt.service.websocket.MqttWebSocketServiceData;
 
@@ -236,7 +237,7 @@ namespace YSAI.Mqtt.service.websocket
             {
                 return Task.Run(() =>
                 {
-                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端取消订阅事件} ]( {arg.ClientId} ) 取消了 ( {arg.TopicFilter} ) 的订阅", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端取消订阅事件} ]( {arg.ClientId} ) 取消了 ( {arg.TopicFilter} ) 的订阅", arg.ClientId, ResultType.String));
                 });
             }
 
@@ -247,7 +248,7 @@ namespace YSAI.Mqtt.service.websocket
             {
                 return Task.Run(() =>
                 {
-                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端订阅事件} ]( {arg.ClientId} ) 订阅了主题 ( {arg.TopicFilter.Topic} )", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端订阅事件} ]( {arg.ClientId} ) 订阅了主题 ( {arg.TopicFilter.Topic} )", arg.ClientId, ResultType.String));
                 });
             }
 
@@ -267,7 +268,7 @@ namespace YSAI.Mqtt.service.websocket
                             dynamic DynamicObj = new ExpandoObject();
                             DynamicObj.Messages = arg.ApplicationMessage;
                             DynamicObj.SenderID = arg.SenderId;
-                            OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端消息事件} ]( {arg.SenderId} ) 发布了主题 ( {arg.ApplicationMessage.Topic} ) 内容 ( {Encoding.UTF8.GetString(arg.ApplicationMessage.Payload)} )", DynamicObj, Core.@enum.ResultType.Dynamic));
+                            OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端消息事件} ]( {arg.SenderId} ) 发布了主题 ( {arg.ApplicationMessage.Topic} ) 内容 ( {Encoding.UTF8.GetString(arg.ApplicationMessage.Payload)} )", DynamicObj, ResultType.Dynamic));
                             break;
                     }
                 });
@@ -280,7 +281,7 @@ namespace YSAI.Mqtt.service.websocket
             {
                 return Task.Run(() =>
                 {
-                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端断开事件} ]( {arg.ClientId} ) 已断开", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端断开事件} ]( {arg.ClientId} ) 已断开", arg.ClientId, ResultType.String));
                 });
             }
 
@@ -291,7 +292,7 @@ namespace YSAI.Mqtt.service.websocket
             {
                 return Task.Run(() =>
                 {
-                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端连接事件} ]( {arg.ClientId} ) 已连接", arg.ClientId, Core.@enum.ResultType.String));
+                    OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端连接事件} ]( {arg.ClientId} ) 已连接", arg.ClientId, ResultType.String));
                 });
             }
 
@@ -309,12 +310,12 @@ namespace YSAI.Mqtt.service.websocket
                     if (arg.UserName != mqttServiceData_Static.UserName || arg.Password != mqttServiceData_Static.Password)
                     {
                         arg.ReasonCode = MQTTnet.Protocol.MqttConnectReasonCode.BadUserNameOrPassword;
-                        OnEventHandler_Static?.Invoke(this, new EventResult(false, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证异常:{arg.ReasonCode}", arg.ClientId, Core.@enum.ResultType.String));
+                        OnEventHandler_Static?.Invoke(this, new EventResult(false, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证异常:{arg.ReasonCode}", arg.ClientId, ResultType.String));
                     }
                     else
                     {
                         arg.ReasonCode = MQTTnet.Protocol.MqttConnectReasonCode.Success;
-                        OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证成功", arg.ClientId, Core.@enum.ResultType.String));
+                        OnEventHandler_Static?.Invoke(this, new EventResult(true, $"[ {Steps.客户端身份验证事件} ]( {arg.ClientId} ) 身份验证成功", arg.ClientId, ResultType.String));
                     }
                 }));
             }

+ 6 - 5
src/YSAI.NetMQ/NetMQData.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 
 namespace YSAI.NetMQ
 {
@@ -16,7 +17,7 @@ namespace YSAI.NetMQ
             /// 当订阅地址与发布地址一致时,此实例又是服务端又是客户端
             /// </summary>
             [Description("订阅地址")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? SAddress { get; set; } = "tcp://127.0.0.1:8866";
 
             /// <summary>
@@ -25,14 +26,14 @@ namespace YSAI.NetMQ
             /// 当订阅地址与发布地址一致时,此实例又是服务端又是客户端
             /// </summary>
             [Description("发布地址")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? PAddress { get; set; } = "tcp://127.0.0.1:8866";
 
             /// <summary>
             /// 队列大小
             /// </summary>
             [Description("队列大小")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int ReceiveHighWatermark { get; set; } = 1000;
 
             /// <summary>
@@ -40,7 +41,7 @@ namespace YSAI.NetMQ
             /// </summary>
             [Description("超时时间")]
             [Unit("ms")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int TimeOut { get; set; } = 1000;
         }
 

+ 7 - 6
src/YSAI.NetMQ/NetMQOperate.cs

@@ -1,9 +1,10 @@
 using NetMQ;
 using NetMQ.Sockets;
 using System.Collections.Concurrent;
-using YSAI.Core.data;
-using YSAI.Core.handler;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
+using YSAI.Model.tool;
 using YSAI.Unility;
 
 namespace YSAI.NetMQ
@@ -253,11 +254,11 @@ namespace YSAI.NetMQ
                             Content = sSocket.ReceiveFrameString();
                             if (Content.IsJson())
                             {
-                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", Core.@enum.ResultType.Dynamic));
+                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", ResultType.Dynamic));
                             }
                             else
                             {
-                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", Core.@enum.ResultType.Dynamic));
+                                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", ResultType.Dynamic));
                             }
                         }
                     }
@@ -399,7 +400,7 @@ namespace YSAI.NetMQ
                 //命名空间
                 string nameSpace = "YSAI.Netty.NettyClientOperate";
                 //参数处理
-                OperateResult operateResult = ParamHandler.Get(new NetMQData.Basics(), name, Properties: new List<ParamStructure.propertie>
+                OperateResult operateResult = ParamTool.Get(new NetMQData.Basics(), name, Properties: new List<ParamStructure.propertie>
                 {
                     new ParamStructure.propertie
                     {

+ 1 - 1
src/YSAI.NetMQ/YSAI.NetMQ.csproj

@@ -18,6 +18,6 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="NetMQ" Version="4.0.1.13" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+	<PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
 </Project>

+ 1 - 1
src/YSAI.Netty/YSAI.Netty.csproj

@@ -18,6 +18,6 @@
   <ItemGroup>
     <PackageReference Include="DotNetty.Handlers" Version="0.7.5" />
     <PackageReference Include="DotNetty.Transport" Version="0.7.5" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+	<PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
 </Project>

+ 8 - 7
src/YSAI.Netty/client/NettyClientData.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.Netty.client
@@ -21,35 +22,35 @@ namespace YSAI.Netty.client
             /// 主机
             /// </summary>
             [Description("主机")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string Host { get; set; }
 
             /// <summary>
             /// 端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// SSL文件路径
             /// </summary>
             [Description("SSL文件路径")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.upload)]
+            [Display(true, true, false, ParamStructure.dataCate.upload)]
             public string? SslFilePath { get; set; }
 
             /// <summary>
             /// SSL文件密码
             /// </summary>
             [Description("SSL文件密码")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? SslFilePassword { get; set; }
 
             /// <summary>
             /// 任务数量
             /// </summary>
             [Description("任务数量")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int TaskNumber { get; set; } = 5;
 
             /// <summary>
@@ -57,7 +58,7 @@ namespace YSAI.Netty.client
             /// </summary>
             [Description("任务处理间隔")]
             [Unit("ms")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int TaskHandleInterval { get; set; } = 100;
         }
     }

+ 8 - 7
src/YSAI.Netty/client/NettyClientOperate.cs

@@ -7,9 +7,10 @@ using System.Collections.Concurrent;
 using System.Net;
 using System.Net.Security;
 using System.Security.Cryptography.X509Certificates;
-using YSAI.Core.data;
-using YSAI.Core.handler;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
+using YSAI.Model.tool;
 using YSAI.Unility;
 
 namespace YSAI.Netty.client
@@ -227,12 +228,12 @@ namespace YSAI.Netty.client
                                         if (Content.IsJson())
                                         {
                                             //OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content},\"Terminal\":\"{Terminal}\"" + "}", Core.@enum.ResultType.Dynamic));
-                                            OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", Core.@enum.ResultType.Dynamic));
+                                            OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", ResultType.Dynamic));
                                         }
                                         else
                                         {
                                             //OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\",\"Terminal\":\"{Terminal}\"" + "}", Core.@enum.ResultType.Dynamic));
-                                            OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", Core.@enum.ResultType.Dynamic));
+                                            OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", ResultType.Dynamic));
                                         }
                                     }
                                 }
@@ -311,7 +312,7 @@ namespace YSAI.Netty.client
             protected override void ChannelRead0(IChannelHandlerContext contex, string msg)
             {
                 //消息抛出
-                MessageEvent?.Invoke(this, new EventResult(true, msg, new Info { Context = contex, Msg = msg }, Core.@enum.ResultType.Dynamic));
+                MessageEvent?.Invoke(this, new EventResult(true, msg, new Info { Context = contex, Msg = msg }, ResultType.Dynamic));
             }
 
             /// <summary>
@@ -507,7 +508,7 @@ namespace YSAI.Netty.client
                 //命名空间
                 string nameSpace = "YSAI.Netty.NettyClientOperate";
                 //参数处理
-                OperateResult operateResult = ParamHandler.Get(new NettyClientData.Basics(), name, Properties: new List<ParamStructure.propertie>
+                OperateResult operateResult = ParamTool.Get(new NettyClientData.Basics(), name, Properties: new List<ParamStructure.propertie>
                 {
                     new ParamStructure.propertie
                     {

+ 5 - 4
src/YSAI.Netty/service/NettyServiceData.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.Netty.service
@@ -21,21 +22,21 @@ namespace YSAI.Netty.service
             /// 端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// SSL文件路径
             /// </summary>
             [Description("SSL文件路径")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.upload)]
+            [Display(true, true, false, ParamStructure.dataCate.upload)]
             public string? SslFilePath { get; set; }
 
             /// <summary>
             /// SSL文件密码
             /// </summary>
             [Description("SSL文件密码")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? SslFilePassword { get; set; }
         }
     }

+ 2 - 2
src/YSAI.Netty/service/NettyServiceOperate.cs

@@ -8,8 +8,8 @@ using DotNetty.Transport.Channels.Sockets;
 using System.Collections.Concurrent;
 using System.Net;
 using System.Security.Cryptography.X509Certificates;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Netty.service

+ 7 - 6
src/YSAI.RabbitMQ/RabbitMQData.cs

@@ -1,5 +1,6 @@
 using System.ComponentModel;
-using YSAI.Core.attribute;
+using YSAI.Model.attribute;
+using YSAI.Model.data;
 using YSAI.Unility;
 
 namespace YSAI.RabbitMQ
@@ -24,35 +25,35 @@ namespace YSAI.RabbitMQ
             /// 交换机名称
             /// </summary>
             [Description("交换机名称")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? ExChangeName { get; set; }
 
             /// <summary>
             /// 要连接的地址
             /// </summary>
             [Description("连接地址")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, true, ParamStructure.dataCate.text)]
             public string? HostName { get; set; }
 
             /// <summary>
             /// 端口
             /// </summary>
             [Description("端口")]
-            [Display(true, true, true, Core.data.ParamStructure.dataCate.unmber)]
+            [Display(true, true, true, ParamStructure.dataCate.unmber)]
             public int Port { get; set; }
 
             /// <summary>
             /// 用户
             /// </summary>
             [Description("用户名")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? UserName { get; set; }
 
             /// <summary>
             /// 密码
             /// </summary>
             [Description("密码")]
-            [Display(true, true, false, Core.data.ParamStructure.dataCate.text)]
+            [Display(true, true, false, ParamStructure.dataCate.text)]
             public string? Password { get; set; }
         }
     }

+ 7 - 6
src/YSAI.RabbitMQ/RabbitMQOperate.cs

@@ -2,9 +2,10 @@
 using RabbitMQ.Client.Events;
 using System.Collections.Concurrent;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.handler;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
+using YSAI.Model.tool;
 using YSAI.Unility;
 
 namespace YSAI.RabbitMQ
@@ -315,11 +316,11 @@ namespace YSAI.RabbitMQ
             string Content = Encoding.UTF8.GetString(e.Body.ToArray());
             if (Content.IsJson())
             {
-                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", Core.@enum.ResultType.Dynamic));
+                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":{Content}" + "}", ResultType.Dynamic));
             }
             else
             {
-                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", Core.@enum.ResultType.Dynamic));
+                OnEventHandler(this, new EventResult(true, $"{TAG} 接收到主题 ( {Topic} ) 内容 ( {Content} )", "{" + $"\"Topic\":\"{Topic}\",\"Content\":\"{Content}\"" + "}", ResultType.Dynamic));
             }
         }
 
@@ -480,7 +481,7 @@ namespace YSAI.RabbitMQ
                 //命名空间
                 string nameSpace = "YSAI.RabbitMQ.RabbitMQOperate";
                 //参数处理
-                OperateResult operateResult = ParamHandler.Get(new RabbitMQData.Basics(), name, Properties: new List<ParamStructure.propertie>
+                OperateResult operateResult = ParamTool.Get(new RabbitMQData.Basics(), name, Properties: new List<ParamStructure.propertie>
                 {
                     new ParamStructure.propertie
                     {

+ 1 - 1
src/YSAI.RabbitMQ/YSAI.RabbitMQ.csproj

@@ -17,7 +17,7 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="RabbitMQ.Client" Version="6.7.0" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
   <!--<ItemGroup>
 		<ProjectReference Include="..\YSAI.Core\YSAI.Core.csproj" />

+ 1 - 1
src/YSAI.Redis/RedisData.cs

@@ -1,4 +1,4 @@
-using YSAI.Core.@interface;
+using YSAI.Model.@interface;
 
 namespace YSAI.Redis
 {

+ 2 - 2
src/YSAI.Redis/RedisOperate.cs

@@ -1,6 +1,6 @@
 using StackExchange.Redis;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Redis

+ 2 - 2
src/YSAI.Redis/YSAI.Redis.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.327.27165</Version>
+    <Version>23.328.18305</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
@@ -17,6 +17,6 @@
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="StackExchange.Redis" Version="2.7.4" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
 </Project>

+ 1 - 1
src/YSAI.Core/reflection/ReflectionData.cs

@@ -1,6 +1,6 @@
 using System.Reflection;
 
-namespace YSAI.Core.reflection
+namespace YSAI.Reflection
 {
     /// <summary>
     /// 反射

+ 4 - 4
src/YSAI.Core/reflection/ReflectionOperate.cs

@@ -1,12 +1,12 @@
 using Newtonsoft.Json.Linq;
 using System.Collections.Concurrent;
 using System.Reflection;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@interface;
 using YSAI.Unility;
-using static YSAI.Core.reflection.ReflectionData;
+using static YSAI.Reflection.ReflectionData;
 
-namespace YSAI.Core.reflection
+namespace YSAI.Reflection
 {
     /// <summary>
     /// 反射操作

+ 21 - 0
src/YSAI.Reflection/YSAI.Reflection.csproj

@@ -0,0 +1,21 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>enable</Nullable>
+    <Version>23.328.18305</Version>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
+    <Authors>Shun</Authors>
+    <Company>YSAI</Company>
+    <Product>SCADA</Product>
+    <GenerateDocumentationFile>True</GenerateDocumentationFile>
+    <DescriptionType>扩展工具</DescriptionType>
+    <DescriptionName>Relay</DescriptionName>
+    <DescriptionDetails>数据转发,使用已发布的转发库实现数据转分发</DescriptionDetails>
+    <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
+  </ItemGroup>
+</Project>

+ 2 - 2
src/YSAI.Rpc/YSAI.Rpc.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.327.27165</Version>
+    <Version>23.328.18305</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
@@ -19,6 +19,6 @@
     <PackageReference Include="DotNetty.Codecs" Version="0.7.5" />
     <PackageReference Include="ImpromptuInterface" Version="8.0.4" />
     <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
-    <PackageReference Include="YSAI.Core" Version="23.327.26637" />
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
   </ItemGroup>
 </Project>

+ 4 - 3
src/YSAI.Rpc/client/RpcClient.cs

@@ -9,8 +9,9 @@ using System.Collections.Concurrent;
 using System.Net;
 using System.Reflection;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Rpc.data;
 using YSAI.Rpc.@interface;
 using YSAI.Rpc.unility;
@@ -297,7 +298,7 @@ namespace YSAI.Rpc.client
         }
         public void Exception(Exception ex)
         {
-            OnEventHandler(this, new EventResult(false, ex.Message, ex, Core.@enum.ResultType.Object));
+            OnEventHandler(this, new EventResult(false, ex.Message, ex, ResultType.Object));
             Dispose();
         }
 

+ 1 - 1
src/YSAI.Rpc/interface/IRpc.cs

@@ -1,6 +1,6 @@
 using DotNetty.Buffers;
 using DotNetty.Transport.Channels;
-using YSAI.Core.data;
+using YSAI.Model.data;
 
 namespace YSAI.Rpc.@interface
 {

+ 4 - 3
src/YSAI.Rpc/service/RpcService.cs

@@ -8,8 +8,9 @@ using Newtonsoft.Json;
 using System.Collections.Concurrent;
 using System.Reflection;
 using System.Text;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Rpc.data;
 using YSAI.Rpc.@interface;
 using YSAI.Rpc.unility;
@@ -353,7 +354,7 @@ namespace YSAI.Rpc.service
 
         public void Exception(Exception ex)
         {
-            OnEventHandler(this, new EventResult(false, ex.Message, ex, Core.@enum.ResultType.Object));
+            OnEventHandler(this, new EventResult(false, ex.Message, ex, ResultType.Object));
         }
 
         public void Dispose()

src/YSAI.Core/script/ScriptData.cs → src/YSAI.Script/ScriptData.cs


+ 4 - 3
src/YSAI.Core/script/ScriptOperate.cs

@@ -1,6 +1,7 @@
 using Microsoft.ClearScript.V8;
-using YSAI.Core.data;
-using YSAI.Core.@interface;
+using YSAI.Model.data;
+using YSAI.Model.@enum;
+using YSAI.Model.@interface;
 using YSAI.Unility;
 
 namespace YSAI.Core.script
@@ -121,7 +122,7 @@ namespace YSAI.Core.script
                         }
                         break;
                 }
-                return Break("Execute", true, RData: RetParam, RType: @enum.ResultType.String);
+                return Break("Execute", true, RData: RetParam, RType: ResultType.String);
             }
             catch (Exception ex)
             {

+ 22 - 0
src/YSAI.Script/YSAI.Script.csproj

@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <Nullable>enable</Nullable>
+    <Version>23.328.18305</Version>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
+    <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
+    <Authors>Shun</Authors>
+    <Company>YSAI</Company>
+    <Product>SCADA</Product>
+    <GenerateDocumentationFile>True</GenerateDocumentationFile>
+    <DescriptionType>扩展工具</DescriptionType>
+    <DescriptionName>Script</DescriptionName>
+    <DescriptionDetails>通用脚本公共处理处</DescriptionDetails>
+    <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.ClearScript" Version="7.4.4" />
+    <PackageReference Include="YSAI.Model" Version="23.328.22745" />
+  </ItemGroup>
+</Project>

+ 6 - 5
src/YSAI.Test.All/Program.cs

@@ -10,15 +10,16 @@ RedisOperate redisOperate = RedisOperate.Instance(new RedisData.Basics
     UseTAG = true,
 });
 Console.WriteLine(redisOperate.On().ToJson().JsonFormatting());
-
-for (int i = 0; i < 10; i++)
+Console.WriteLine(redisOperate.KeyDelete("*"));
+for (int i = 0; i < 100; i++)
 {
     Console.WriteLine(i);
-    Console.WriteLine(redisOperate.StringSet("A1", new data().ToXml()));
-    Console.WriteLine(redisOperate.StringGet("A1"));
+    string xmlstr = new data().ToXml();
+    Console.WriteLine(redisOperate.StringSet($"A{i}", new data()));
+    Console.WriteLine(redisOperate.StringGet<data>($"A{i}").ToJson());
 }
 
-//Console.WriteLine(redisOperate.KeyDelete("*"));
+
 
 Console.WriteLine(redisOperate.Off().ToJson().JsonFormatting());
 

+ 10 - 0
src/YSAI.Unility/ParamTool.cs

@@ -0,0 +1,10 @@
+namespace YSAI.Unility
+{
+    /// <summary>
+    /// 参数工具
+    /// </summary>
+    public class ParamTool
+    {
+
+    }
+}

+ 2 - 2
src/YSAI.Unility/YSAI.Unility.csproj

@@ -3,14 +3,14 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.327.26405</Version>
+    <Version>23.328.18305</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
     <Company>YSAI</Company>
     <Product>SCADA</Product>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
-    <DescriptionType>核心组件</DescriptionType>
+    <DescriptionType>扩展工具</DescriptionType>
     <DescriptionName>Unility</DescriptionName>
     <DescriptionDetails>字节、枚举、文件、字符串、验证、比对、转换、反射、Json、Xml、Ftp、System ...</DescriptionDetails>
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>

+ 9 - 3
src/YSAI.VT/Program.cs

@@ -15,9 +15,17 @@ namespace YSAI.VT
             List<string> strings = new List<string>
             {
 #if RELEASE
+                //"YSAI.Model",
                 //"YSAI.Core",
-                //"YSAI.Log",
+
                 //"YSAI.Unility",
+                //"YSAI.Log",
+                //"YSAI.Rpc",
+                //"YSAI.Redis",
+                //"YSAI.Reflection",
+                //"YSAI.Script",
+                //"YSAI.Handler"
+
                 //"YSAI.AllenBradley",
                 //"YSAI.Beckhoff",
                 //"YSAI.Can",
@@ -33,8 +41,6 @@ namespace YSAI.VT
                 //"YSAI.NetMQ",
                 //"YSAI.Netty",
                 //"YSAI.RabbitMQ",
-                //"YSAI.Rpc",
-                //"YSAI.Redis",
 #endif
             };