Files
serein-flow/Serein.Script/IScriptInvokeContext.cs
fengjiayi 152077e9b5 1. 重新设计了Generate项目及相关特性的命名,避免与其他类型混淆。
2. 补充了部分注释。
3. 修改了删除容器节点时,容器内子节点未正确删除的问题。
2025-07-30 21:15:07 +08:00

52 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Serein.Library.Api;
namespace Serein.Script
{
/// <summary>
/// 脚本运行上下文
/// </summary>
public interface IScriptInvokeContext
{
/// <summary>
/// 脚本运行的流程上下文,包含了流程上下文和变量等信息
/// </summary>
IFlowContext FlowContext { get; }
/// <summary>
/// 是否该退出了(由 TokenSource 控制,用于响应外部发出停止信号)
/// </summary>
bool IsReturn { get; }
/// <summary>
/// 是否需要提前返回(用于脚本中提前结束)
/// </summary>
bool IsNeedReturn { get; set; }
/// <summary>
/// 是否严格检查 Null 值 (禁止使用 Null
/// </summary>
bool IsCheckNullValue { get; set; }
/// <summary>
/// 获取变量的值
/// </summary>
/// <param name="varName"></param>
/// <returns></returns>
object? GetVarValue(string varName);
/// <summary>
/// 设置变量的值
/// </summary>
/// <param name="varName"></param>
/// <param name="value"></param>
/// <returns></returns>
bool SetVarValue(string varName, object? value);
/// <summary>
/// 结束调用
/// </summary>
/// <returns></returns>
void OnExit();
}
}