refactor(flow) : 重新实现了UIContextOperation的注入逻辑,为后续开发Avalonia版本的编辑器做准备。

This commit is contained in:
fengjiayi
2025-09-19 23:58:52 +08:00
parent 0161c64e2c
commit 630008198d
21 changed files with 415 additions and 200 deletions

View File

@@ -1,5 +1,6 @@
using Serein.Library;
using Serein.NodeFlow.Tool;
using System.Globalization;
using System.Reflection;
namespace Serein.NodeFlow.Model.Library
@@ -229,14 +230,17 @@ namespace Serein.NodeFlow.Model.Library
public FlowLibraryInfo ToInfo()
{
var assemblyName = Assembly.GetName().Name;
var mdInfos = MethodDetailss.Values.Select(x => x.ToInfo()).ToList();
mdInfos.Sort((a, b) => string.Compare(a.MethodName, b.MethodName, StringComparison.OrdinalIgnoreCase));
var mdInfos = MethodDetailss.Values.Select(x => x.ToInfo())
.OrderBy(d => d.AssemblyName)
.ThenBy(s => s.MethodAnotherName, StringComparer.Create(CultureInfo.GetCultureInfo("zh-cn"), true))
.ToList();
return new FlowLibraryInfo
{
AssemblyName = assemblyName,
FileName = FullName,
FilePath = FilePath,
MethodInfos = mdInfos.ToList(),
MethodInfos = mdInfos,
};
}