Esempio n. 1
0
        public Schedulable <T> AddCoroutine(IScheduler scheduler, Func <IEnumerator> starter)
        {
            var func        = CoroutineFunctor.Create(() => default(T), _ => starter());
            var schedulable = new Schedulable <T>(scheduler, func);

            AddChild(schedulable);
            return(schedulable);
        }
Esempio n. 2
0
        public Schedulable <T> ContinueWithCoroutine(IScheduler scheduler, Func <IEnumerator> starter)
        {
            if (Parent == null)
            {
                throw new NoParentException();
            }

            var func        = CoroutineFunctor.Create(() => default(T), _ => starter());
            var schedulable = new Schedulable <T>(scheduler, func);

            Parent.AddChild(schedulable);
            return(schedulable);
        }