using System; namespace SK.Framework { /// /// 条件事件(直到...) /// public class UntilAction : AbstractAction { private readonly Func predicate; public UntilAction(Func predicate, Action action) { this.predicate = predicate; onCompleted = action; } protected override void OnInvoke() { isCompleted = predicate.Invoke(); } } }