1. 移除了FlipflopContext,统一流程API

2. Script项目脚本修复了 RawString 原始字符串存在的问题
3. Script使用了ValueNode统一了值类型节点,为后续扩展更多的值类型做准备
4. TypeHelper.ToTypeOfString()方法中添加了部分值类型的"Type[]”与“List<Type>”的显式定义,用于脚本在类型中定义数组成员
5. Script项目脚本默认挂载的json方法拆分为jsonObj(String)与jsonStr(Object)以支持序列化与反序列化
6. 项目保存为dnf项目文件时,将不再保存名称为”Default"并且没有节点的画布,避免重复保存时默认画布增多。
This commit is contained in:
fengjiayi
2025-08-02 22:04:13 +08:00
parent 93747ce7fd
commit 79af278b70
26 changed files with 398 additions and 149 deletions

View File

@@ -72,23 +72,12 @@ namespace Serein.NodeFlow.Model.Nodes
instance = ioc.Get(md.ActingInstanceType);
}
var args = MethodDetails.ParameterDetailss.Length == 0 ? [] : await this.GetParametersAsync(context, token);
var args = MethodDetails.ParameterDetailss.Length == 0 ? []
: await this.GetParametersAsync(context, token);
// 因为这里会返回不确定的泛型 IFlipflopContext<TRsult>
// 而我们只需要获取到 State 和 Value返回的数据
// 所以使用 dynamic 类型接收
dynamic flipflopContext = await dd.InvokeAsync(instance, args);
FlipflopStateType flipflopStateType = flipflopContext.State;
context.NextOrientation = flipflopStateType.ToContentType();
if (flipflopContext.Type == TriggerDescription.Overtime)
{
throw new FlipflopException(MethodDetails.MethodName + "触发器超时触发。Guid" + Guid);
}
object result = flipflopContext.Value;
var flowReslt = FlowResult.OK(this.Guid, context, result);
return flowReslt;
var result = await dd.InvokeAsync(instance, args);
var flowResult = FlowResult.OK(this.Guid, context, result);
return flowResult;
}
}