mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-19 07:56:35 +08:00
修改了很多
This commit is contained in:
@@ -47,6 +47,10 @@ namespace Serein.Library.Core.NodeFlow
|
||||
/// <returns></returns>
|
||||
public object? GetFlowData(string nodeGuid)
|
||||
{
|
||||
if (string.IsNullOrEmpty(nodeGuid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if(dictNodeFlowData.TryGetValue(nodeGuid,out var data))
|
||||
{
|
||||
return data;
|
||||
@@ -70,8 +74,18 @@ namespace Serein.Library.Core.NodeFlow
|
||||
/// <summary>
|
||||
/// 结束流程
|
||||
/// </summary>
|
||||
public void EndCurrentBranch()
|
||||
public void Exit()
|
||||
{
|
||||
foreach (var nodeObj in dictNodeFlowData.Values)
|
||||
{
|
||||
if (nodeObj is not null)
|
||||
{
|
||||
if (typeof(IDisposable).IsAssignableFrom(nodeObj?.GetType()) && nodeObj is IDisposable disposable)
|
||||
{
|
||||
disposable?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dictNodeFlowData?.Clear();
|
||||
RunState = RunState.Completion;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.14</Version>
|
||||
<Version>1.0.15</Version>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
Reference in New Issue
Block a user