26 строки
695 B
C#
26 строки
695 B
C#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Roslyn.UnitTestFramework
|
|
{
|
|
internal static partial class EnumerableExtensions
|
|
{
|
|
private class ComparisonComparer<T> : Comparer<T>
|
|
{
|
|
private readonly Comparison<T> _compare;
|
|
|
|
public ComparisonComparer(Comparison<T> compare)
|
|
{
|
|
_compare = compare;
|
|
}
|
|
|
|
public override int Compare(T x, T y)
|
|
{
|
|
return _compare(x, y);
|
|
}
|
|
}
|
|
}
|
|
}
|