mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-11 18:36:34 +08:00
重新设计了条件节点的Model
This commit is contained in:
@@ -405,15 +405,13 @@ namespace Serein.NodeFlow.Env
|
||||
/// </summary>
|
||||
/// <param name="nodeGuid"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> InvokeNodeAsync(string nodeGuid)
|
||||
public async Task<object> InvokeNodeAsync(IDynamicContext context, string nodeGuid)
|
||||
{
|
||||
IDynamicContext context = new DynamicContext(this);
|
||||
object result = true;
|
||||
if (this.NodeModels.TryGetValue(nodeGuid, out var model))
|
||||
{
|
||||
result = await model.InvokeAsync(context);
|
||||
}
|
||||
context.Exit();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,9 +364,9 @@ namespace Serein.NodeFlow.Env
|
||||
await currentFlowEnvironment.StartAsyncInSelectNode(startNodeGuid);
|
||||
}
|
||||
|
||||
public async Task<object> InvokeNodeAsync( string nodeGuid)
|
||||
public async Task<object> InvokeNodeAsync(IDynamicContext context, string nodeGuid)
|
||||
{
|
||||
return await currentFlowEnvironment.InvokeNodeAsync( nodeGuid);
|
||||
return await currentFlowEnvironment.InvokeNodeAsync(context, nodeGuid);
|
||||
}
|
||||
|
||||
public async Task StartRemoteServerAsync(int port = 7525)
|
||||
|
||||
@@ -459,7 +459,7 @@ namespace Serein.NodeFlow.Env
|
||||
//UIContextOperation?.Invoke(() => OnStartNodeChange?.Invoke(new StartNodeChangeEventArgs(nodeGuid,nodeGuid)));
|
||||
}
|
||||
|
||||
public async Task<object> InvokeNodeAsync(string nodeGuid)
|
||||
public async Task<object> InvokeNodeAsync(IDynamicContext context, string nodeGuid)
|
||||
{
|
||||
Console.WriteLine("远程环境尚未实现接口 InvokeNodeAsync");
|
||||
_ = msgClient.SendAsync(EnvMsgTheme.SetStartNode, new
|
||||
|
||||
Reference in New Issue
Block a user