Exemplo 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));
        }
Exemplo n.º 2
0
 public static IEnumerable <TResult> Select <TSource, TResult>(
     this IEnumerable <TSource> source,
     Func <TSource, int, TResult> selector)
 {
     return(Consumable.Select(source, selector));
 }