Пример #1
0
        public static async Task <T[]> ToArrayAsync <T>(this IEnumerableAsync <T> enumerableAsync,
                                                        EastFive.Analytics.ILogger logger = default(Analytics.ILogger))
        {
            var items = await enumerableAsync.Async(logger);

            return(items.ToArray());
        }
Пример #2
0
        public static async Task <ILookup <TKey, T> > ToLookupAsync <TKey, T>(this IEnumerableAsync <T> enumerableAsync,
                                                                              Func <T, TKey> keySelector)
        {
            var enumerable = await enumerableAsync.Async();

            return(enumerable.ToLookup(keySelector));
        }
Пример #3
0
        public static async Task <TResult> ToArrayAsync <T, TResult>(this IEnumerableAsync <T> enumerableAsync,
                                                                     Func <T[], TResult> onComplete)
        {
            var enumerable = await enumerableAsync.Async();

            var items = enumerable.ToArray();

            return(onComplete(items));
        }
Пример #4
0
        public static async Task <List <T> > ToListAsync <T>(this IEnumerableAsync <T> enumerableAsync)
        {
            var enumerable = await enumerableAsync.Async();

            return(enumerable.ToList());
        }
Пример #5
0
        public static async Task <IDictionary <TKey, TValue> > ToDictionaryAsync <TKey, TValue>(this IEnumerableAsync <KeyValuePair <TKey, TValue> > enumerableAsync)
        {
            var enumerable = await enumerableAsync.Async();

            return(enumerable.ToDictionary());
        }