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