コード例 #1
0
        public static IEnumerable <TResult> ToEnumerable <TDelegateItems, T1, T2, T3, T4, TResult>(
            this IEnumerableAsync <TDelegateItems> items,
            Func <T1, T2, T3, T4, TResult> convert)
        {
            var iterator = items.GetEnumerable <TResult, Func <T1, T2, T3, T4, TResult> >(convert);

            return(iterator);
        }
コード例 #2
0
        public static IEnumerable <TResult> ToEnumerable <TDelegateItems, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, TResult>(
            this IEnumerableAsync <TDelegateItems> items,
            Func <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, TResult> convert)
        {
            var iterator = items.GetEnumerable <TResult, Func <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, TResult> >(convert);

            return(iterator);
        }
コード例 #3
0
        //public delegate void ToDictionaryDelegate<TKey, TValue>(TKey key, TValue value);
        //public static IDictionary<TKey, TValue> ToEnumerable<TDelegateItems, T1, T2, T3, TKey, TValue>(
        //    this IEnumerableAsync<TDelegateItems> items,
        //    Action<T1, T2, T3, ToDictionaryDelegate<TKey, TValue>> convert)
        //{
        //    var iterator = items.GetEnumerable<KeyValuePair<TKey, TValue>, Func<T1, T2, T3, KeyValuePair<TKey, TValue>>>(
        //        (t1, t2, t3) =>
        //        {
        //            var key = default(TKey);
        //            var value = default(TValue);
        //            convert(t1, t2, t3, (k, v) => { key = k; value = v; });
        //            return new KeyValuePair<TKey, TValue>(key, value);
        //        });
        //    return iterator.ToDictionary(;
        //}

        //public static IDictionary<TKey, TValue> ToDictionary<TDelegateItems, T1, TKey, TValue>(
        //    this IEnumerableAsync<TDelegateItems> items,
        //    Action<T1, ToDictionaryDelegate<TKey, TValue>> convert)
        //{
        //    var iterator = items.GetEnumerable<TResult, Func<T1, TResult>>(convert);
        //    return iterator;
        //}

        #endregion

        #region ToEnumerable

        public static IEnumerable <TResult> ToEnumerable <TDelegateItems, TDelegateConvert, TResult>(
            this IEnumerableAsync <TDelegateItems> items,
            TDelegateConvert convert)
        {
            var iterator = items.GetEnumerable <TResult, TDelegateConvert>(convert);

            return(iterator);
        }