public static DelayChain Chain(this DelayChain e, IEnumerable <Action> handler) { foreach (var v in handler) { e.Actions.Enqueue(v); } return(e); }
public static Timer Do(this DelayChain e) { return(e.Delay.AtInterval( t => { if (e.Actions.Count == 0) { t.stop(); return; } e.Actions.Dequeue()(); } )); }
public static DelayChain Chain(this DelayChain e, Action handler) { e.Actions.Enqueue(handler); return(e); }