插件组件优化

This commit is contained in:
FalconFly 2024-04-30 15:53:12 +08:00
parent 3d338ea7cc
commit 80179ea54e
4 changed files with 50 additions and 1 deletions

View 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; }
}
}

View 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);
}
}

View File

@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace Falcon.SugarApi.Plugin
{
/// <summary>
/// 插件列表
/// </summary>
public class PluginList:List<PluginItem> { }
}

View File

@ -5,7 +5,7 @@ namespace Falcon.SugarApi.Plugin
/// <summary> /// <summary>
/// 插件配置 /// 插件配置
/// </summary> /// </summary>
public static class PluginOptions public class PluginOptions
{ {
/// <summary> /// <summary>
/// 插件安装搜索目录 /// 插件安装搜索目录