mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-20 00:06:45 +08:00
更改了dll参数类型,更改了流程执行,添加了异常分支处理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Serein.Library.IOC;
|
||||
using Serein.NodeFlow.Model;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,23 +13,24 @@ using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
namespace Serein.NodeFlow
|
||||
{
|
||||
|
||||
public enum FfState
|
||||
{
|
||||
Succeed,
|
||||
Cancel,
|
||||
}
|
||||
//public enum FfState
|
||||
//{
|
||||
// Succeed,
|
||||
// Cancel,
|
||||
// Error,
|
||||
//}
|
||||
/// <summary>
|
||||
/// 触发器上下文
|
||||
/// </summary>
|
||||
public class FlipflopContext
|
||||
{
|
||||
public FfState State { get; set; }
|
||||
public FlowStateType State { get; set; }
|
||||
public object? Data { get; set; }
|
||||
/*public FlipflopContext()
|
||||
{
|
||||
State = FfState.Cancel;
|
||||
}*/
|
||||
public FlipflopContext(FfState ffState, object? data = null)
|
||||
public FlipflopContext(FlowStateType ffState, object? data = null)
|
||||
{
|
||||
State = ffState;
|
||||
Data = data;
|
||||
@@ -144,7 +146,7 @@ namespace Serein.NodeFlow
|
||||
public NodeRunTcs NodeRunCts { get; set; }
|
||||
public Task CreateTimingTask(Action action, int time = 100, int count = -1)
|
||||
{
|
||||
NodeRunCts ??= ServiceContainer.Get<NodeRunTcs>();
|
||||
NodeRunCts ??= ServiceContainer.GetOrInstantiate<NodeRunTcs>();
|
||||
return Task.Factory.StartNew(async () =>
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
|
||||
Reference in New Issue
Block a user