// Needed for Workaround #if !NET_4_6 using System; using System.Collections.Generic; using LinqInternal.Core; namespace LinqInternal.Collections.Specialized { [System.Diagnostics.DebuggerNonUserCode] internal class CustomComparer : IComparer { private readonly Func _comparison; public CustomComparer(Func comparison) { if (comparison == null) { throw new ArgumentNullException("comparison"); } _comparison = comparison; } public CustomComparer(Comparison comparison) { if (comparison == null) { throw new ArgumentNullException("comparison"); } _comparison = comparison.Invoke; } public int Compare(T x, T y) { return _comparison.Invoke(x, y); } } } #endif