private static void GetProductsFromCategory(List <API.IProduct> productList, API.ICategory category) { productList.AddRange(category.Products); foreach (var subCategory in category.SubCategories) { GetProductsFromCategory(productList, subCategory); // todo: this can loop if the category relations do not form a tree } }
internal void ClearCachedValues() { // temporary hack _categories = null; _parentNodeTypeAlias = null; _products = null; _productsRecursively = null; _parentCategory = null; }