添加项目文件。
This commit is contained in:
1 parent
54c7b83029
commit
ef50fa0620
84 files changed
+9188
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace MAX.Framework.Interfaces;
|
||||
|
||||
public interface IAppClosedHandler
|
||||
{
|
||||
/// <summary> 优先级(优先级越高越先执行) </summary>
|
||||
int Priority { get; }
|
||||
|
||||
/// <summary> 描述信息 </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary> 应用关闭时执行的方法 </summary>
|
||||
/// <param name="parameter"> 参数 </param>
|
||||
/// <exception cref="Exception"/>
|
||||
void AppClosed(AppCloseParameter parameter);
|
||||
}
|
||||
|
||||
public record class AppCloseParameter(bool IsAppInitialized);
|
||||
@@ -0,0 +1,8 @@
|
||||
using MAX.Core.DependencyInjection;
|
||||
|
||||
namespace MAX.Framework.Interfaces;
|
||||
|
||||
public interface IAppConfig : ISingletonDependency
|
||||
{
|
||||
T GetValue<T>(string key, T defaultValue = default);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using MAX.Core.DependencyInjection;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MAX.Framework.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化接口
|
||||
/// </summary>
|
||||
public interface IAppInitialize : ISingletonDependency, IPriority
|
||||
{
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// App 初始化数据
|
||||
/// </summary>
|
||||
void AppInitialize(IStatusReport statusReport);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化接口(异步)
|
||||
/// </summary>
|
||||
public interface IAppInitializeAsync : ISingletonDependency, IPriority
|
||||
{
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// App 初始化数据
|
||||
/// </summary>
|
||||
Task AppInitializeAsync(IStatusReport statusReport);
|
||||
}
|
||||
|
||||
public interface IStatusReport
|
||||
{
|
||||
void SetStatus(string status);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MAX.Framework.Interfaces;
|
||||
|
||||
public interface IPriority
|
||||
{
|
||||
/// <summary>
|
||||
/// 优先级(优先级越高越先执行)
|
||||
/// </summary>
|
||||
int Priority { get; }
|
||||
}
|
||||
Reference in new issue
Block a user