public RecipeUpdateResult UpdateRecipes() { var allRecipesComplete = true; var completedRecipes = new List <string>(); foreach (var recipe in recipeRoots) { var complete = itemTree.IsItemDone(recipe.Name); if (complete && !_completedRecipes.Contains(recipe.Name)) { _completedRecipes.Add(recipe.Name); completedRecipes.Add(recipe.Name); } if (!complete) { allRecipesComplete = false; } } return(new RecipeUpdateResult() { allRecipesComplete = allRecipesComplete, completedRecipes = completedRecipes.ToArray() }); }