对象预览器支持了值类型集合成员的简单预览

This commit is contained in:
fengjiayi
2024-09-24 22:39:43 +08:00
parent 8a502b77d4
commit 06f6d2f34b
28 changed files with 1674 additions and 859 deletions

View File

@@ -9,22 +9,22 @@ namespace Serein.Library.Core.NodeFlow
/// </summary>
public class DynamicContext: IDynamicContext
{
public DynamicContext(ISereinIOC sereinIoc, IFlowEnvironment flowEnvironment)
public DynamicContext(/*ISereinIOC sereinIoc, */IFlowEnvironment flowEnvironment)
{
SereinIoc = sereinIoc;
FlowEnvironment = flowEnvironment;
//SereinIoc = sereinIoc;
Env = flowEnvironment;
}
public NodeRunCts NodeRunCts { get; set; }
public ISereinIOC SereinIoc { get; }
public IFlowEnvironment FlowEnvironment { get; }
//public ISereinIOC SereinIoc { get; }
public IFlowEnvironment Env { get; }
public Task CreateTimingTask(Action action, int time = 100, int count = -1)
{
if (NodeRunCts == null)
{
NodeRunCts = SereinIoc.GetOrRegisterInstantiate<NodeRunCts>();
NodeRunCts = Env.IOC.GetOrRegisterInstantiate<NodeRunCts>();
}
// 使用局部变量,避免捕获外部的 `action`
Action localAction = action;