Exemple #1
0
        internal override AsyncCachingComparer <TElement> GetComparer(AsyncCachingComparer <TElement> childComparer)
        {
            AsyncCachingComparer <TElement> cmp = childComparer == null
                ? new AsyncCachingComparerWithTaskAndCancellation <TElement, TKey>(_keySelector, _comparer, _descending)
                : new AsyncCachingComparerWithTaskAndCancellationAndChild <TElement, TKey>(_keySelector, _comparer, _descending, childComparer);

            return(_parent != null?_parent.GetComparer(cmp) : cmp);
        }
Exemple #2
0
 public AsyncCachingComparerWithTaskAndCancellationAndChild(Func <TElement, CancellationToken, ValueTask <TKey> > keySelector, IComparer <TKey> comparer, bool descending, AsyncCachingComparer <TElement> child)
     : base(keySelector, comparer, descending)
 {
     _child = child;
 }
Exemple #3
0
 internal abstract AsyncCachingComparer <TElement> GetComparer(AsyncCachingComparer <TElement> childComparer);
Exemple #4
0
 public AsyncCachingComparerWithChild(Func <TElement, TKey> keySelector, IComparer <TKey> comparer, bool descending, AsyncCachingComparer <TElement> child)
     : base(keySelector, comparer, descending)
 {
     _child = child;
 }