public IEnumerable <OpenCloseResponsibility.Product> FilterProductsBy(IEnumerable <OpenCloseResponsibility.Product> products , ProductCategory.Color color, ProductCategory.Size size) { foreach (var item in products) { if (item._color == color || item._size == size) { yield return(item); } } }
public ColorSpec(ProductCategory.Color _color) { color = _color; }
public Product(string ProductName, ProductCategory.Size size, ProductCategory.Color color) { _ProductName = ProductName; _size = size; _color = color; }