public IEnumerable <BaseObject> Filter(IEnumerable <BaseObject> items, IFilterKind <BaseObject> type) { foreach (var product in items) { if (type.IsSatisfied(product)) { yield return(product); } } }
public IEnumerable <Product> Filter(IEnumerable <Product> items, IFilterKind <Product> kind) { foreach (var product in items) { if (kind.IsSatisfied(product)) { yield return(product); } } }