Files
Future/Future.Contract/Instruction/LoopInstructBase.cs
2025-08-30 17:19:57 +08:00

30 lines
888 B
C#
Raw Permalink 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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Future.Contract
{
/// <summary>
/// 迭代空间的公共基类可以使用Continue和Break实现迭代控制
/// </summary>
public abstract class LoopInstructBase : StructInstructBase
{
public ELoopState LoopState { get; internal set; }
/// <summary>
/// 执行迭代逻辑
/// </summary>
/// <param name="outChannels">信息输出管道,可以向其中输出信息</param>
/// <returns></returns>
protected sealed override InstructResult DoExecute(IEnumerable<IOutputChannel> outChannels)
{
//if()
return this.DoLoop(outChannels);
}
protected abstract InstructResult DoLoop(IEnumerable<IOutputChannel> outChannels);
}
}