#if FAT using System; using System.Collections.Generic; using LinqInternal.Core; namespace LinqInternal.Collections.Specialized { [System.Diagnostics.DebuggerNonUserCode] internal class ConversionComparer : IComparer { private readonly IComparer _comparer; private readonly Func _converter; public ConversionComparer(IComparer comparer, Func converter) { if (comparer == null) { throw new ArgumentNullException("comparer"); } _comparer = comparer; if (converter == null) { throw new ArgumentNullException("converter"); } _converter = converter; } public int Compare(TInput x, TInput y) { return _comparer.Compare(_converter(x), _converter(y)); } } } #endif