XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.ServerInteractive

[DLL] Server interaction extension, including user identity verification and querying in conjunction with AutoConfig

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.ServerInteractive

重构EntryPointList为实例属性以支持多态和重写

将EntryPointList从静态属性调整为实例属性,并在相关类和接口中统一声明方式,支持多态和依赖注入,提升代码灵活性和可维护性。

17b5044
XFE工作室室长 <mail@xfegzs.com>
提交于

代码差异

3 个文件 +4 -4
Modified XFEExtension.NetCore.ServerInteractive.SourceGenerator/EntryPointGenerator.cs +1 -1
@@ -224,7 +224,7 @@ namespace {namespaceName}
224 224 /// <summary>
225 225 /// 本类型的入口点路径列表(覆盖基类的空列表)
226 226 /// </summary>
227 public new static List<string> EntryPointList {{ get; }} = new()
227 public override List<string> EntryPointList {{ get; }} = new()
228 228 {{");
229 229
230 230 // 添加所有入口点到静态列表
Modified XFEExtension.NetCore.ServerInteractive/Implements/CoreService/ServerCoreStandardServiceBase.cs +2 -2
@@ -5,12 +5,12 @@ namespace XFEExtension.NetCore.ServerInteractive.Implements.CoreService;
5 5 /// <summary>
6 6 /// 服务器标准核心服务基类
7 7 /// </summary>
8 public abstract partial class ServerCoreStandardServiceBase : XFEServerCoreServiceBase, IServerCoreStandardService, IServerCoreRouteProvider
8 public abstract class ServerCoreStandardServiceBase : XFEServerCoreServiceBase, IServerCoreStandardService, IServerCoreRouteProvider
9 9 {
10 10 /// <summary>
11 11 /// 所有入口点路径列表(由增量生成器自动填充)
12 12 /// </summary>
13 public static List<string> EntryPointList { get; } = [];
13 public virtual List<string> EntryPointList { get; } = [];
14 14
15 15 /// <inheritdoc/>
16 16 public virtual Dictionary<string, Action> SyncEntryPoints { get; } = new();
Modified XFEExtension.NetCore.ServerInteractive/Interfaces/CoreService/IServerCoreRouteProvider.cs +1 -1
@@ -8,5 +8,5 @@ public interface IServerCoreRouteProvider
8 8 /// <summary>
9 9 /// 入口点路径列表
10 10 /// </summary>
11 static abstract List<string> EntryPointList { get; }
11 List<string> EntryPointList { get; }
12 12 }