コード例 #1
0
 private static IOrderedAsyncEnumerable <TSource> ThenByShim <TSource, TKey>(
     IOrderedAsyncEnumerable <TSource> source, Func <TSource, TKey> expression, OrderingDirection orderingDirection)
 {
     return(orderingDirection == OrderingDirection.Asc
         ? source.ThenBy(expression)
         : source.ThenByDescending(expression));
 }
コード例 #2
0
        public static IOrderedAsyncEnumerable <T> ThenBy <T>(this IOrderedAsyncEnumerable <T> source, string column,
                                                             SortDirection direction, IEnumerable <string>?extraAllowedColumns = null)
        {
            var lambda = CreatePropertySelector <T>(column, extraAllowedColumns);

            if (direction == SortDirection.Descending)
            {
                return(source.ThenByDescending(lambda));
            }

            return(source.ThenBy(lambda));
        }
コード例 #3
0
ファイル: OrderBy.cs プロジェクト: solidrock/Rx.NET
        public static IOrderedAsyncEnumerable <TSource> ThenBy <TSource, TKey>(this IOrderedAsyncEnumerable <TSource> source, Func <TSource, TKey> keySelector)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            if (keySelector == null)
            {
                throw new ArgumentNullException(nameof(keySelector));
            }

            return(source.ThenBy(keySelector, Comparer <TKey> .Default));
        }
コード例 #4
0
 internal static IOrderedAsyncEnumerable <TSource> _ThenBy <TSource, TKey>(
     IOrderedAsyncEnumerable <TSource> source, Func <TSource, TKey> expression, OrderingDirection orderingDirection)
 => orderingDirection == OrderingDirection.Asc
         ? source.ThenBy(expression)
         : source.ThenByDescending(expression);