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