Skip to content

Commit

Permalink
[修改]1. 修改程序集帮助类的命名
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Dec 6, 2024
1 parent db6d8c3 commit 2b4ab18
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Open(string url, string dbName)
};
});

var types = Assembly.GetRuntimeImplementTypeNames<BaseCacheState>();
var types = AssemblyHelper.GetRuntimeImplementTypeNames<BaseCacheState>();
foreach (var type in types)
{
Client.CodeFirst.InitTables(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override async Task StartAsync()
_namingServiceManager.AddSelf(Setting);

StartServer();
var aopHandlerTypes = Assembly.GetRuntimeImplementTypeNamesInstance<IHttpAopHandler>();
var aopHandlerTypes = AssemblyHelper.GetRuntimeImplementTypeNamesInstance<IHttpAopHandler>();
aopHandlerTypes.Sort((handlerX, handlerY) => handlerX.Priority.CompareTo(handlerY.Priority));
// 启动Http服务
await HttpServer.Start(Setting.HttpPort, Setting.HttpsPort, HotfixManager.GetHttpHandler, aopHandlerTypes);
Expand Down
2 changes: 1 addition & 1 deletion GameFrameX.StartUp/AppExitHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void Init(Action<string> existCallBack, AppSetting setting)
_isKill = false;
_setting = setting;
_existCallBack = existCallBack;
var fetalExceptionExitHandlers = Assembly.GetRuntimeImplementTypeNames<IFetalExceptionExitHandler>();
var fetalExceptionExitHandlers = AssemblyHelper.GetRuntimeImplementTypeNames<IFetalExceptionExitHandler>();
foreach (var exceptionExitHandler in fetalExceptionExitHandlers)
{
var handler = (IFetalExceptionExitHandler)Activator.CreateInstance(exceptionExitHandler);
Expand Down
2 changes: 1 addition & 1 deletion GameFrameX.StartUp/GameApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static async Task Entry(string[] args, Action initAction, Action<LogOptio
GlobalSettings.Load("Configs/app_config.json");
initAction?.Invoke();

var types = Utility.Assembly.GetTypes();
var types = Utility.AssemblyHelper.GetTypes();
if (types != null)
{
foreach (var type in types)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace GameFrameX.Utility;
/// <summary>
/// 程序集辅助器
/// </summary>
public static class Assembly
public static class AssemblyHelper
{
private static readonly System.Reflection.Assembly[] Assemblies;
private static readonly Dictionary<string, Type> CachedTypes = new Dictionary<string, Type>(StringComparer.Ordinal);

static Assembly()
static AssemblyHelper()
{
Assemblies = AppDomain.CurrentDomain.GetAssemblies();
}
Expand Down

0 comments on commit 2b4ab18

Please sign in to comment.