public static IEnumerable Search(IEnumerable items, IInvoker invoker, object typedValue, CompareType comparer, IComparer comparision) { foreach (var item in items) { if (item != null && invoker.CheckItem(item, typedValue, comparer, comparision)) { yield return(item); } } }