暂时实现了简陋的脚本AST分析解释,后面再绑定到控件上

This commit is contained in:
fengjiayi
2024-12-20 23:39:29 +08:00
parent 114e81424b
commit ef119e11e3
52 changed files with 3175 additions and 261 deletions

66
NodeFlow/ScriptFlowApi.cs Normal file
View File

@@ -0,0 +1,66 @@
using Serein.Library;
using Serein.Library.Api;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Serein.NodeFlow
{
/// <summary>
/// 脚本代码中关于流程运行的API
/// </summary>
public class ScriptFlowApi : IScriptFlowApi
{
/// <summary>
/// 流程环境
/// </summary>
public IFlowEnvironment Env { get; private set; }
/// <summary>
/// 对应的节点
/// </summary>
public NodeModelBase NodeModel { get; private set; }
IDynamicContext IScriptFlowApi.Context { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
/// <summary>
/// 创建流程脚本接口
/// </summary>
/// <param name="environment">运行环境</param>
/// <param name="nodeModel">节点</param>
public ScriptFlowApi(IFlowEnvironment environment, NodeModelBase nodeModel)
{
Env = environment;
NodeModel = nodeModel;
}
Task<object> IScriptFlowApi.CallNode(string nodeGuid)
{
throw new NotImplementedException();
}
object IScriptFlowApi.GetDataOfParams(int index)
{
throw new NotImplementedException();
}
object IScriptFlowApi.GetDataOfParams(string name)
{
throw new NotImplementedException();
}
object IScriptFlowApi.GetFlowData()
{
throw new NotImplementedException();
}
object IScriptFlowApi.GetGlobalData(string keyName)
{
throw new NotImplementedException();
}
}
}