优化了流程的进行

This commit is contained in:
fengjiayi
2024-09-15 22:07:10 +08:00
parent fe2ccaf74c
commit 61d40977ff
21 changed files with 153 additions and 117 deletions

View File

@@ -7,6 +7,7 @@ using Serein.NodeFlow.Base;
using Serein.NodeFlow.Model;
using Serein.NodeFlow.Tool;
using System.Diagnostics;
using System.Net.Mime;
using System.Reflection;
using System.Reflection.Emit;
using System.Xml.Linq;
@@ -618,6 +619,18 @@ namespace Serein.NodeFlow
Path = assembly.Location,
};
}
public static ConnectionType ToContentType(this FlipflopStateType flowStateType)
{
return flowStateType switch
{
FlipflopStateType.Succeed => ConnectionType.IsSucceed,
FlipflopStateType.Fail => ConnectionType.IsFail,
FlipflopStateType.Error => ConnectionType.IsError,
FlipflopStateType.Cancel => ConnectionType.None,
_ => throw new NotImplementedException("未定义的流程状态")
};
}
}