流程接口节点新增了对脚本节点的支持

This commit is contained in:
fengjiayi
2025-05-30 15:42:59 +08:00
parent 9c4e5b2735
commit f0eb11c914
12 changed files with 234 additions and 150 deletions

View File

@@ -135,6 +135,18 @@ namespace Serein.Library
this.NodeModel = nodeModel;
}
public ParameterDetails(ParameterData pdInfo, int argIndex)
{
this.Index = argIndex;
this.DataType = typeof(object);
this.ArgDataSourceNodeGuid = pdInfo.SourceNodeGuid;
this.ArgDataSourceType = EnumHelper.ConvertEnum<ConnectionArgSourceType>(pdInfo.SourceType);
this.DataValue = pdInfo.Value;
this.InputType = ParameterValueInputType.Input;
this.IsExplicitData = pdInfo.State;
this.Name = pdInfo.ArgName;
}
/// <summary>
/// 通过参数信息加载实体,用于加载项目文件、远程连接的场景
/// </summary>
@@ -223,7 +235,7 @@ namespace Serein.Library
}
#endregion
#region -
if (ExplicitType.IsEnum && DataType != ExplicitType)
if (ExplicitType is not null && ExplicitType.IsEnum && DataType != ExplicitType)
{
var resultEnum = Enum.Parse(ExplicitType, DataValue);
// 获取绑定的类型