Skip to content

Instantly share code, notes, and snippets.

@AdoraNwodo

AdoraNwodo/Store.cs

Last active Nov 22, 2019
Embed
What would you like to do?
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