Esempio n. 1
0
        public static IEnumerable <TResult> SelectMany <TSource, TResult>(
            this IEnumerable <TSource> source,
            Func <TSource, int, IEnumerable <TResult> > selector)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (selector == null)
            {
                throw new ArgumentNullException("selector");
            }

            return(new ConsumableSelectMany <TResult, TResult, TResult>(Consumable.Select(source, selector), IdentityTransform <TResult> .Instance, IdentityTransform <TResult> .Instance));
        }
Esempio n. 2
0
 public static IEnumerable <TResult> Select <TSource, TResult>(
     this IEnumerable <TSource> source,
     Func <TSource, int, TResult> selector)
 {
     return(Consumable.Select(source, selector));
 }