3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
10 // <OWNER>Microsoft</OWNER>
12 // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
14 using System.Collections.Generic;
16 namespace System.Linq.Parallel
19 /// Comparer that wraps another comparer, and flips the result of each comparison to the
22 /// <typeparam name="T"></typeparam>
23 internal class ReverseComparer<T> : IComparer<T>
25 private IComparer<T> m_comparer;
27 internal ReverseComparer(IComparer<T> comparer)
29 m_comparer = comparer;
32 public int Compare(T x, T y)
34 return -m_comparer.Compare(x, y);