mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-11 20:19:24 +08:00
GIT练习
This commit is contained in:
40
Library/DynamicFlow/NodeModel/SingleFlipflopNode.cs
Normal file
40
Library/DynamicFlow/NodeModel/SingleFlipflopNode.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Serein.DynamicFlow.Tool;
|
||||
|
||||
namespace Serein.DynamicFlow.NodeModel
|
||||
{
|
||||
|
||||
public class SingleFlipflopNode : NodeBase
|
||||
{
|
||||
//public override void Execute(DynamicContext context)
|
||||
//{
|
||||
// throw new NotImplementedException("无法以非await/async的形式调用触发器");
|
||||
//}
|
||||
|
||||
//public virtual async Task ExecuteAsync(DynamicContext context, Action NextTask = null)
|
||||
//{
|
||||
// if (DelegateCache.GlobalDicDelegates.TryGetValue(MethodDetails.MethodName, out Delegate? del))
|
||||
// {
|
||||
// object?[]? parameters = GetParameters(context, MethodDetails);
|
||||
|
||||
// // 根据 ExplicitDatas.Length 判断委托类型
|
||||
// var func = (Func<object, object[], Task<FlipflopContext>>)del;
|
||||
|
||||
// // 调用委托并获取结果
|
||||
// FlipflopContext flipflopContext = await func.Invoke(MethodDetails.ActingInstance, parameters);
|
||||
|
||||
// if (flipflopContext != null)
|
||||
// {
|
||||
// if (flipflopContext.State == FfState.Cancel)
|
||||
// {
|
||||
// throw new Exception("取消此异步");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// CurrentState = flipflopContext.State == FfState.Succeed;
|
||||
// context.SetFlowData(flipflopContext.Data);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user