Created
June 4, 2012 16:57
-
-
Save atifaziz/2869531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma warning disable 1591 | |
using System; | |
using System.Collections.Generic; | |
namespace MoreLinq | |
{ | |
namespace NoConflict | |
{ | |
namespace DistinctBy | |
{ | |
public static class MoreEnumerable | |
{ | |
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, | |
Func<TSource, TKey> keySelector) | |
{ | |
return MoreLinq.MoreEnumerable.DistinctBy(source, keySelector); | |
} | |
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, | |
Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) | |
{ | |
return MoreLinq.MoreEnumerable.DistinctBy(source, keySelector, comparer); | |
} | |
} | |
} | |
namespace EquiZip | |
{ | |
public static class MoreEnumerable | |
{ | |
public static IEnumerable<TResult> EquiZip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, | |
IEnumerable<TSecond> second, | |
Func<TFirst, TSecond, TResult> resultSelector) | |
{ | |
return MoreLinq.MoreEnumerable.EquiZip(first, second, resultSelector); | |
} | |
} | |
} | |
namespace Zip | |
{ | |
public static class MoreEnumerable | |
{ | |
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, | |
IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) | |
{ | |
return MoreLinq.MoreEnumerable.Zip(first, second, resultSelector); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment