mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-01 22:16:34 +08:00
refactor(flow) : 重新实现了UIContextOperation的注入逻辑,为后续开发Avalonia版本的编辑器做准备。
This commit is contained in:
@@ -24,21 +24,21 @@ namespace Serein.NodeFlow.Env
|
||||
private readonly FlowLibraryService flowLibraryService;
|
||||
private readonly FlowOperationService flowOperationService;
|
||||
private readonly FlowModelService flowModelService;
|
||||
private readonly UIContextOperation UIContextOperation;
|
||||
private readonly UIContextOperation uiContextOperation;
|
||||
|
||||
public FlowControl(IFlowEnvironment flowEnvironment,
|
||||
IFlowEnvironmentEvent flowEnvironmentEvent,
|
||||
FlowLibraryService flowLibraryService,
|
||||
FlowOperationService flowOperationService,
|
||||
FlowModelService flowModelService,
|
||||
UIContextOperation UIContextOperation)
|
||||
UIContextOperation uiContextOperation)
|
||||
{
|
||||
this.flowEnvironment = flowEnvironment;
|
||||
this.flowEnvironmentEvent = flowEnvironmentEvent;
|
||||
this.flowLibraryService = flowLibraryService;
|
||||
this.flowOperationService = flowOperationService;
|
||||
this.flowModelService = flowModelService;
|
||||
this.UIContextOperation = UIContextOperation;
|
||||
this.uiContextOperation = uiContextOperation;
|
||||
|
||||
contexts = new ObjectPool<IFlowContext>(() => new FlowContext(flowEnvironment), context => context.Reset());
|
||||
flowTaskOptions = new FlowWorkOptions
|
||||
@@ -340,7 +340,7 @@ namespace Serein.NodeFlow.Env
|
||||
{
|
||||
flowWorkManagement.Exit();
|
||||
}
|
||||
UIContextOperation?.Invoke(() => flowEnvironmentEvent.OnFlowRunComplete(new FlowEventArgs()));
|
||||
uiContextOperation?.Invoke(() => flowEnvironmentEvent.OnFlowRunComplete(new FlowEventArgs()));
|
||||
IOC.Reset();
|
||||
GC.Collect();
|
||||
return Task.FromResult(true);
|
||||
|
||||
Reference in New Issue
Block a user