From afe0783de1e019d5348b5578cfbbbb6e365de3f7 Mon Sep 17 00:00:00 2001
From: fengjiayi <12821976+ning_xi@user.noreply.gitee.com>
Date: Fri, 18 Jul 2025 23:17:28 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=BAScript=E6=8F=90=E4=BE=9B=E4=BA=86Serei?=
=?UTF-8?q?nScript.ExecuteAsync=E6=89=A7=E8=A1=8C=E8=84=9A=E6=9C=AC?=
=?UTF-8?q?=E6=96=87=E6=9C=AC=E5=86=85=E5=AE=B9=E7=9A=84=E9=9D=99=E6=80=81?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Serein.Script/ScriptInvokeContext.cs | 11 +++++++
Serein.Script/SereinScript.cs | 19 +++++++++++
Serein.Script/SereinScriptInterpreter.cs | 2 +-
Workbench/App.xaml.cs | 40 +++++++++++++++---------
4 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/Serein.Script/ScriptInvokeContext.cs b/Serein.Script/ScriptInvokeContext.cs
index ce98d2d..667278b 100644
--- a/Serein.Script/ScriptInvokeContext.cs
+++ b/Serein.Script/ScriptInvokeContext.cs
@@ -4,10 +4,21 @@ namespace Serein.Script
{
public class ScriptInvokeContext : IScriptInvokeContext
{
+ ///
+ /// 脚本使用流程上下文
+ ///
+ ///
public ScriptInvokeContext(IDynamicContext dynamicContext)
{
FlowContext = dynamicContext;
}
+
+ ///
+ /// 不使用流程上下文
+ ///
+ public ScriptInvokeContext()
+ {
+ }
public IDynamicContext FlowContext{ get; }
diff --git a/Serein.Script/SereinScript.cs b/Serein.Script/SereinScript.cs
index d5283c4..dd8dbe2 100644
--- a/Serein.Script/SereinScript.cs
+++ b/Serein.Script/SereinScript.cs
@@ -1,4 +1,5 @@
using Serein.Library;
+using Serein.Library.Api;
using Serein.Script.Node;
using Serein.Script.Node.FlowControl;
using System;
@@ -15,6 +16,9 @@ namespace Serein.Script
public class SereinScript
{
+
+
+
///
/// 类型分析
///
@@ -24,6 +28,21 @@ namespace Serein.Script
private ProgramNode? programNode;
+
+ public static Task