using System.Collections.Generic; using MemoryPools.Collections.Specialized; namespace MemoryPools.Collections.Linq { public static partial class PoolingEnumerable { public static IPoolingEnumerable Except(this IPoolingEnumerable source, IPoolingEnumerable except) { var exceptDict = Pool>.Get().Init(0); foreach (var item in except) exceptDict[item] = 1; return Pool>.Get().Init(source, exceptDict); } public static IPoolingEnumerable Except(this IPoolingEnumerable source, IPoolingEnumerable except, IEqualityComparer comparer) { var exceptDict = Pool>.Get().Init(0); foreach (var item in except) exceptDict[item] = 1; return Pool>.Get().Init(source, exceptDict, comparer); } } }