public ProductService(IProductLoader loader) { _loader = loader; _itemsAsync = new AsyncLazy <List <Product> >(async() => await _loader.LoadProducts()); }
public ProductProvider(IProductLoader loader) { Loader = loader; }
public InputValidator(IProductLoader loader) { _loader = loader; }
public Shop() { _productLoader = new ProductLoader(); //TODO replace with DI _orderLoader = new OrderLoader(); _receiptGenerator = new ReceiptGenerator(); }
public ProductService(IProductLoader loader) { _loader = loader; _itemsAsync = new AsyncLazy<List<Product>>(async () => await _loader.LoadProducts()); }
/// <summary> /// Converts a productlist from one format to another /// </summary> /// <param name="from"> Source list </param> /// <param name="to"> Destination list</param> private static void TransferProductList(IProductLoader from, IProductLoader to) { to.SaveProducts(from.LoadProducts()); }