public static T Until <T>(this T self, Func <bool> func, bool autoRecyle = false) where T : ContainerNode { UntilNode node = Allocate <UntilNode>(self.env); node.Config(func, autoRecyle); self.Append(node); return(self); }
/// <summary> /// 开启一个条件结束节点,直到条件成立 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="self"></param> /// <param name="condition"></param> /// <param name="autoRecyle"></param> /// <returns></returns> public static T Until <T>(this T self, Func <bool> condition, bool autoRecyle = false) where T : IContainerNode { UntilNode node = Allocate <UntilNode>(self.env); node.Config(condition, autoRecyle); (self as ContainerNode).Append(node); return(self); }