Beispiel #1
0
        public static DelayChain Chain(this DelayChain e, IEnumerable <Action> handler)
        {
            foreach (var v in handler)
            {
                e.Actions.Enqueue(v);
            }

            return(e);
        }
Beispiel #2
0
        public static Timer Do(this DelayChain e)
        {
            return(e.Delay.AtInterval(
                       t =>
            {
                if (e.Actions.Count == 0)
                {
                    t.stop();
                    return;
                }

                e.Actions.Dequeue()();
            }
                       ));
        }
Beispiel #3
0
        public static DelayChain Chain(this DelayChain e, Action handler)
        {
            e.Actions.Enqueue(handler);

            return(e);
        }