1. 更新了节点入参的条件判断:入参类型为IFlowContext(流程上下文)时禁止创建参数来源连接。

2. [Script]脚本节点移除了“getFlowContext”内置方法,改为自动识别入参名称为“context""flowContext""flow_context",如果是,将自动使用 IFlowContext 类型参数(运行时自动给定)
3. NodeFlow项目中,FlowLibraryService添加了GetType(string)以及TryGetType(string,Type?)方法,用于流程环境搜索外部加载的程序集类型。
This commit is contained in:
fengjiayi
2025-08-04 20:13:03 +08:00
parent bf987f4ef0
commit e389dbb967
10 changed files with 103 additions and 37 deletions

View File

@@ -147,6 +147,46 @@ namespace Serein.NodeFlow.Services
#region
/// <summary>
/// 搜索类型
/// </summary>
/// <param name="fullName"></param>
/// <param name="type"></param>
/// <returns></returns>
public bool TryGetType(string fullName,[NotNullWhen(true)] out Type? type)
{
var assemblys = _flowLibraryCaches.Values.Select(key => key.Assembly).ToArray();
foreach(var assembly in assemblys)
{
type = assembly.GetType(fullName);
if(type is not null)
{
return true;
}
}
type = null;
return false;
}
/// <summary>
/// 搜索类型
/// </summary>
/// <param name="fullName"></param>
/// <returns></returns>
public Type? GetType(string fullName)
{
var assemblys = _flowLibraryCaches.Values.Select(key => key.Assembly).ToArray();
Type? type;
foreach (var assembly in assemblys)
{
type = assembly.GetType(fullName);
if(type is not null)
{
return type;
}
}
return null;
}
/// <summary>
/// 获取方法描述
/// </summary>