From 2b4ab189975ef498598a25deecd6666b9e1d04dd Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Dec 2024 10:51:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]1.=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=9B=86=E5=B8=AE=E5=8A=A9=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameFrameX.DataBase.RDS.MySql/SqlSugarDbService.cs | 2 +- .../StartUp/Discovery/AppStartUpDiscoveryCenter.cs | 2 +- GameFrameX.StartUp/AppExitHandler.cs | 2 +- GameFrameX.StartUp/GameApp.cs | 2 +- .../{Utility.Assembly.cs => Utility.AssemblyHelper.cs} | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename GameFrameX.Utility/{Utility.Assembly.cs => Utility.AssemblyHelper.cs} (98%) diff --git a/DataBaseServer/GameFrameX.DataBase.RDS.MySql/SqlSugarDbService.cs b/DataBaseServer/GameFrameX.DataBase.RDS.MySql/SqlSugarDbService.cs index 251fca87..d80dcb1e 100644 --- a/DataBaseServer/GameFrameX.DataBase.RDS.MySql/SqlSugarDbService.cs +++ b/DataBaseServer/GameFrameX.DataBase.RDS.MySql/SqlSugarDbService.cs @@ -50,7 +50,7 @@ public void Open(string url, string dbName) }; }); - var types = Assembly.GetRuntimeImplementTypeNames(); + var types = AssemblyHelper.GetRuntimeImplementTypeNames(); foreach (var type in types) { Client.CodeFirst.InitTables(type); diff --git a/GameFrameX.Launcher/StartUp/Discovery/AppStartUpDiscoveryCenter.cs b/GameFrameX.Launcher/StartUp/Discovery/AppStartUpDiscoveryCenter.cs index e7d492d2..c28bc822 100644 --- a/GameFrameX.Launcher/StartUp/Discovery/AppStartUpDiscoveryCenter.cs +++ b/GameFrameX.Launcher/StartUp/Discovery/AppStartUpDiscoveryCenter.cs @@ -20,7 +20,7 @@ public override async Task StartAsync() _namingServiceManager.AddSelf(Setting); StartServer(); - var aopHandlerTypes = Assembly.GetRuntimeImplementTypeNamesInstance(); + var aopHandlerTypes = AssemblyHelper.GetRuntimeImplementTypeNamesInstance(); aopHandlerTypes.Sort((handlerX, handlerY) => handlerX.Priority.CompareTo(handlerY.Priority)); // 启动Http服务 await HttpServer.Start(Setting.HttpPort, Setting.HttpsPort, HotfixManager.GetHttpHandler, aopHandlerTypes); diff --git a/GameFrameX.StartUp/AppExitHandler.cs b/GameFrameX.StartUp/AppExitHandler.cs index 578e9c31..86c78f67 100644 --- a/GameFrameX.StartUp/AppExitHandler.cs +++ b/GameFrameX.StartUp/AppExitHandler.cs @@ -30,7 +30,7 @@ public static void Init(Action existCallBack, AppSetting setting) _isKill = false; _setting = setting; _existCallBack = existCallBack; - var fetalExceptionExitHandlers = Assembly.GetRuntimeImplementTypeNames(); + var fetalExceptionExitHandlers = AssemblyHelper.GetRuntimeImplementTypeNames(); foreach (var exceptionExitHandler in fetalExceptionExitHandlers) { var handler = (IFetalExceptionExitHandler)Activator.CreateInstance(exceptionExitHandler); diff --git a/GameFrameX.StartUp/GameApp.cs b/GameFrameX.StartUp/GameApp.cs index d6e086fc..4d95856a 100644 --- a/GameFrameX.StartUp/GameApp.cs +++ b/GameFrameX.StartUp/GameApp.cs @@ -71,7 +71,7 @@ public static async Task Entry(string[] args, Action initAction, Action /// 程序集辅助器 /// -public static class Assembly +public static class AssemblyHelper { private static readonly System.Reflection.Assembly[] Assemblies; private static readonly Dictionary CachedTypes = new Dictionary(StringComparer.Ordinal); - static Assembly() + static AssemblyHelper() { Assemblies = AppDomain.CurrentDomain.GetAssemblies(); }