更新框架,增加云库搜索模块
This commit is contained in:
1 parent
8526e5e0d2
commit
f2caec6083
192 files changed
+3626
-804
No files matched your search
@@ -1,6 +1,6 @@
|
||||
|
||||
using MAX.Core.DependencyInjection;
|
||||
using MAX.Core.Infrastructure;
|
||||
using MAX.Core.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
namespace MAX.Core.DependencyInjection;
|
||||
using MAX.Core.Interfaces;
|
||||
|
||||
namespace MAX.Core.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
/// 依赖注册器:把当前模块的服务注册到 <see cref="IServiceRegistrar"/>。
|
||||
/// 底层使用哪个容器由宿主项目决定,MAX.Core 不引用任何容器。
|
||||
/// </summary>
|
||||
public interface IDependencyRegistrar
|
||||
public interface IDependencyRegistrar: IPriority
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册服务
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace MAX.Core.Interfaces;
|
||||
|
||||
public interface IPriority
|
||||
{
|
||||
/// <summary> 优先级(优先级越高越先执行) </summary>
|
||||
int Priority { get; }
|
||||
}
|
||||
|
||||
public static class IntPriority
|
||||
{
|
||||
public const int Highest = 5000;
|
||||
|
||||
public const int VeryHigh = 4000;
|
||||
|
||||
public const int Higher = 3000;
|
||||
|
||||
public const int High = 2000;
|
||||
|
||||
public const int AboveNormal = 1000;
|
||||
|
||||
public const int Normal = 0;
|
||||
|
||||
public const int BelowNormal = -1000;
|
||||
|
||||
public const int Low = -2000;
|
||||
|
||||
public const int Lower = -3000;
|
||||
|
||||
public const int VeryLow = -4000;
|
||||
|
||||
public const int Lowest = -5000;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using MAX.Core.DependencyInjection;
|
||||
|
||||
namespace MAX.Core.Infrastructure;
|
||||
namespace MAX.Core.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// 启动器:实现 <see cref="IDependencyRegistrar"/>,由宿主项目统一发现并按 <see cref="Priority"/> 排序执行。
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MAX.Core.Infrastructure;
|
||||
namespace MAX.Core.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// 单例,需要在当前类中定义
|
||||
@@ -1,5 +1,4 @@
|
||||
using MAX.Core.Infrastructure;
|
||||
|
||||
|
||||
namespace MAX.Core.Logger;
|
||||
|
||||
/// <summary>自定义日志记录器接口</summary>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
using MAX.Core.DependencyInjection;
|
||||
using MAX.Core.Infrastructure;
|
||||
using MAX.Core.Interfaces;
|
||||
|
||||
namespace MAX.Core;
|
||||
|
||||
|
||||
Reference in new issue
Block a user