修改 Startup 加载 和Module 加载

This commit is contained in:
chfei committed 2026-09-23 18:47:54 +08:00
1 parent c732ecb1d2
commit c7fb447034
17 files changed
+462 -383

No files matched your search

+5 -4
View File
@@ -1,4 +1,7 @@
using MAX.Core.DependencyInjection;
using System;
using System.ComponentModel;
using System.Threading.Tasks;
namespace MAX.Core.Interfaces;
@@ -7,12 +10,10 @@ namespace MAX.Core.Interfaces;
/// </summary>
public interface IStartup : IDependencyRegistrar
{
/// <summary>
/// 优先级(优先级越高越先执行)
/// </summary>
int Priority { get; }
/// <summary>
/// 初始化
/// </summary>
void Initialize();
void Start(IServiceProvider serviceProvider);
}
+6
View File
@@ -25,6 +25,7 @@
using MAX.Core.DependencyInjection;
using MAX.Core.Interfaces;
using System;
namespace MAX.Core;
@@ -42,4 +43,9 @@ public class Startup : IStartup
// 示例:恢复 LazyServiceProvider 后,可在这里注册为单例
// registrar.RegisterSingleton<ILazyServiceProvider, LazyServiceProvider>();
}
public void Start(IServiceProvider serviceProvider)
{
}
}