Shun %!s(int64=2) %!d(string=hai) anos
pai
achega
c3ae365898

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

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

+ 13 - 0
src/YSAI.Core/relay/RelayData.cs

@@ -0,0 +1,13 @@
+namespace YSAI.Core.relay
+{
+    public class RelayData
+    {
+        /// <summary>
+        /// 基础数据
+        /// </summary>
+        public class Basics
+        {
+
+        }
+    }
+}

+ 6 - 0
src/YSAI.Core/relay/RelayOperate.cs

@@ -0,0 +1,6 @@
+namespace YSAI.Core.relay
+{
+    public class RelayOperate
+    {
+    }
+}

+ 7 - 0
src/YSAI.DAQ.sln

@@ -139,6 +139,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Reflection", "YSAI.Ref
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YSAI.Script", "YSAI.Script\YSAI.Script.csproj", "{80FE38E7-6534-4C54-A4E6-B4DE43BD557F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YSAI.Relay", "YSAI.Relay\YSAI.Relay.csproj", "{01893D02-B13C-462D-A29F-2584B2D002C5}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -377,6 +379,10 @@ Global
 		{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
+		{01893D02-B13C-462D-A29F-2584B2D002C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{01893D02-B13C-462D-A29F-2584B2D002C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{01893D02-B13C-462D-A29F-2584B2D002C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{01893D02-B13C-462D-A29F-2584B2D002C5}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -445,6 +451,7 @@ Global
 		{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}
+		{01893D02-B13C-462D-A29F-2584B2D002C5} = {F23C3553-3FE7-4ECC-9BBA-8C498C3B4398}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5D5D3927-6714-40C0-84EA-44C5BA4C5E87}

+ 3 - 3
src/YSAI.Reflection/YSAI.Reflection.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.328.25741</Version>
+    <Version>23.328.31332</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>
@@ -11,8 +11,8 @@
     <Product>SCADA</Product>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
     <DescriptionType>扩展工具</DescriptionType>
-    <DescriptionName>Relay</DescriptionName>
-    <DescriptionDetails>数据转发,使用已发布的转发库实现数据转分发</DescriptionDetails>
+    <DescriptionName>Reflection</DescriptionName>
+    <DescriptionDetails>得到*.exe或*.dll等程序集内部的接口、类、方法、字段、属性、特性、事件等信息,还可以动态创建出类型实例并执行其中的方法</DescriptionDetails>
     <Description>$(DescriptionType):$(DescriptionName) ( $(DescriptionDetails) )</Description>
   </PropertyGroup>
   <ItemGroup>

+ 62 - 0
src/YSAI.Relay/RelayData.cs

@@ -0,0 +1,62 @@
+namespace YSAI.Relay
+{
+    public class RelayData
+    {
+        /// <summary>
+        /// 基础数据
+        /// </summary>
+        public class Basics
+        {
+            /// <summary>
+            /// 库文件统一存放文件夹,绝对路径
+            /// </summary>
+            public string? LibFolder { get; set; } = $"{AppDomain.CurrentDomain.BaseDirectory}/lib/relay";
+
+            /// <summary>
+            /// 库配置文件夹,绝对路径
+            /// </summary>
+            public string? LibConfigFolder { get; set; } = $"{AppDomain.CurrentDomain.BaseDirectory}/config/relay";
+
+            /// <summary>
+            /// 库配置唯一标识符键
+            /// </summary>
+            public string? LibConfigSNKey { get; set; } = "SN";
+
+            /// <summary>
+            /// 动态库监控格式
+            /// </summary>
+            public string? DllWatcherFormat { get; set; } = "YSAI.*.dll";
+
+            /// <summary>
+            /// 配置监控格式
+            /// </summary>
+            public string? ConfigWatcherFormat { get; set; } = "*.Relay.Config.json";
+
+            /// <summary>
+            /// 配置文件名称的格式 * 与配置数据中的SN一致
+            /// 库配置:命名空间 + 类名.SN.Config.json
+            /// </summary>
+            public string? ConfigFileNameFormat { get; set; } = "{0}.*.Relay.Config.json";
+
+            /// <summary>
+            /// 配置替换格式
+            /// </summary>
+            public string? ConfigReplaceFormat { get; set; } = ".Relay.Config.json";
+
+            /// <summary>
+            /// 自动打开,创建实例成功后
+            /// </summary>
+            public bool AutoOn { get; set; } = true;
+
+            /// <summary>
+            /// 任务处理数量
+            /// </summary>
+            public int TaskNumber { get; set; } = 5;
+
+            /// <summary>
+            /// 任务处理完成休眠时间(毫秒)
+            /// </summary>
+            public int TaskHandleInterval { get; set; } = 100;
+        }
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1153 - 0
src/YSAI.Relay/RelayOperate.cs


+ 21 - 0
src/YSAI.Relay/YSAI.Relay.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.27977</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>

+ 1 - 1
src/YSAI.RelayManage/RelayManageOperate.cs

@@ -32,7 +32,7 @@ namespace YSAI.RelayManage
         /// <summary>
         /// 接口名称
         /// </summary>
-        private readonly string InterfaceFullName = "YSAI.Core.interface.IRelay";
+        private readonly string InterfaceFullName = "YSAI.Model.interface.IRelay";
 
         /// <summary>
         /// 配置数据

+ 1 - 0
src/YSAI.VT/Program.cs

@@ -25,6 +25,7 @@ namespace YSAI.VT
                 //"YSAI.Redis",
                 //"YSAI.Reflection",
                 //"YSAI.Script",
+                //"YSAI.Relay",
 
                 //"YSAI.AllenBradley",
                 //"YSAI.Beckhoff",