1using System.Collections.ObjectModel;
2using System.Collections.Specialized;
30 if (value?.Pools is INotifyCollectionChanged incs)
37 private void RebuildLists(
object sender, NotifyCollectionChangedEventArgs e)
41 foreach (var dev
in allIngredients.Select(somePool => somePool.ForDevice).Distinct())
44 foreach (var someIng
in allIngredients.Where(someIng => someIng.ForDevice == dev))
46 newBundle.Ingredients.Add(someIng);
52 public ObservableCollection<IngredientsForDevice>
Ingredients {
get; } =
new ObservableCollection<IngredientsForDevice>();
61 public ObservableCollection<CoffeeIngredient>
Ingredients {
get; } =
new ObservableCollection<CoffeeIngredient>();
Classes for managing consumables of our imagined coffee machine.
Keeps track of all consumables that are associated to our mock coffee machine.
readonly CoffeeConsumableManager mManager
void RebuildLists(object sender, NotifyCollectionChangedEventArgs e)
ObservableCollection< IngredientsForDevice > Ingredients
CoffeeConsumableViewModel(CoffeeConsumableManager value)
CoffeeConsumableViewModel()
For the XAML Designer.
Assignment of a list of ingredients to a specific device.
ObservableCollection< CoffeeIngredient > Ingredients
Base class for all used mock coffee ingredients.