示例#1
0
        public static IPromise <IPromiseEnumerator <T> > Reverse <T>(IPromiseEnumerator <T> items)
        {
            return(items.MoveNext().Then(result =>
            {
                if (result == null)
                {
                    return null;
                }

                return PromiseEnumerator.Create(items.Factory, new T[] { result.Current }).Then(right =>
                {
                    return Reverse(result).Then(left =>
                    {
                        return (IPromiseEnumerator <T>)(ConcatEnumerator.Create(left, right));
                    });
                });
            }));
        }
示例#2
0
 public static IPromiseEnumerator <T> Union <T>(IPromiseEnumerator <T> left, IPromiseEnumerator <T> right, IEqualityComparer <T> comparer)
 {
     return(DistinctEnumerator.Create(ConcatEnumerator.Create(left, right), comparer));
 }
示例#3
0
 public static IPromiseEnumerator <T> Union <T>(IPromiseEnumerator <T> left, IPromiseEnumerator <T> right)
 {
     return(DistinctEnumerator.Create(ConcatEnumerator.Create(left, right)));
 }