public static ShoppingRepository getInstance()
 {
     if (shoppingBasket == null)
     {
         
         shoppingBasket = new ShoppingRepository();
         Items.Add("drinks", items);
         return shoppingBasket;
     }
     else
         return shoppingBasket;
 }
Exemplo n.º 2
0
 public static ShoppingRepository getInstance()
 {
     if (shoppingBasket == null)
     {
         shoppingBasket = new ShoppingRepository();
         Items.Add("drinks", items);
         return(shoppingBasket);
     }
     else
     {
         return(shoppingBasket);
     }
 }
Exemplo n.º 3
0
 public List <Item> Add(string itemType, List <Item> items)
 {
     ShoppingRepository.getInstance().addItems(itemType, items);
     return(items);
 }