插件组件优化
This commit is contained in:
parent
3d338ea7cc
commit
80179ea54e
17
Falcon.SugarApi/Plugin/PluginContext.cs
Normal file
17
Falcon.SugarApi/Plugin/PluginContext.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
namespace Falcon.SugarApi.Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件上下文
|
||||
/// </summary>
|
||||
public class PluginContext
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件配置
|
||||
/// </summary>
|
||||
public PluginOptions Options { get; set; }
|
||||
/// <summary>
|
||||
/// 发现的插件
|
||||
/// </summary>
|
||||
public PluginList Plugins { get; set; }
|
||||
}
|
||||
}
|
23
Falcon.SugarApi/Plugin/PluginItem.cs
Normal file
23
Falcon.SugarApi/Plugin/PluginItem.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
namespace Falcon.SugarApi.Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件项目
|
||||
/// </summary>
|
||||
public class PluginItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件名称
|
||||
/// </summary>
|
||||
public string PluginName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Swagger定义
|
||||
/// </summary>
|
||||
public object? SwaggerItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 插件日志
|
||||
/// </summary>
|
||||
public FixedLengthStortedList<string> PluginLogs { get; set; } = new FixedLengthStortedList<string>(100);
|
||||
}
|
||||
}
|
9
Falcon.SugarApi/Plugin/PluginList.cs
Normal file
9
Falcon.SugarApi/Plugin/PluginList.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Falcon.SugarApi.Plugin
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件列表
|
||||
/// </summary>
|
||||
public class PluginList:List<PluginItem> { }
|
||||
}
|
|
@ -5,7 +5,7 @@ namespace Falcon.SugarApi.Plugin
|
|||
/// <summary>
|
||||
/// 插件配置
|
||||
/// </summary>
|
||||
public static class PluginOptions
|
||||
public class PluginOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 插件安装搜索目录
|
||||
|
|
Loading…
Reference in New Issue
Block a user