Skip to content

Instantly share code, notes, and snippets.

@atifaziz
Created June 4, 2012 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atifaziz/2869531 to your computer and use it in GitHub Desktop.
Save atifaziz/2869531 to your computer and use it in GitHub Desktop.
#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