Пример #1
0
        private void SetOrderEnumerator()
        {
            foreach (var source in _enumerators)
            {
                var orderStreamEnumerator = new OrderStreamMergeAsyncEnumerator <T>(_mergeContext, source);
                if (orderStreamEnumerator.HasElement())
                {
                    orderStreamEnumerator.SkipFirst();
                    _queue.Offer(orderStreamEnumerator);
                }
            }

            _currentEnumerator = _queue.IsEmpty() ? _enumerators.FirstOrDefault() : _queue.Peek();
        }
 private void SetOrderEnumerator()
 {
     foreach (var source in _enumerators)
     {
         var orderStreamEnumerator = new OrderStreamMergeAsyncEnumerator <T>(_mergeContext, source);
         if (orderStreamEnumerator.HasElement())
         {
             orderStreamEnumerator.SkipFirst();
             _queue.Offer(orderStreamEnumerator);
         }
     }
     //设置第一个元素聚合的属性值
     CurrentGroupValues = _queue.IsEmpty() ? new List <object>(0) : GetCurrentGroupValues(_queue.Peek());
 }