Skip to content

Instantly share code, notes, and snippets.

@AdoraNwodo
Last active November 22, 2019 06:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdoraNwodo/d384457f3d5baff1b6354951f1d3e7c5 to your computer and use it in GitHub Desktop.
Save AdoraNwodo/d384457f3d5baff1b6354951f1d3e7c5 to your computer and use it in GitHub Desktop.
class Store
{
private double revenue;
private List<string> storeProducts;
public Store(RevenueGenerator generator)
{
revenue = generator.GenerateCurrentRevenue();
storeProducts = new List<string>();
}
async Task UpdateStoreRevenue(Product product)
{
if(!storeProducts.Contains(product.Name))
{
var token = HelperClass.GenerateTokenOrSomething();
await HelperClass.UpdateStoreRevenue(token, product);
revenue += product.Price;
storeProducts.Add(product.Name);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment