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>();
58 public ObservableCollection<CoffeeIngredient>
Ingredients {
get; } =
new ObservableCollection<CoffeeIngredient>();
Keeps track of all consumables that are associated to our mock coffee machine.
ReadOnlyObservableCollection< IConsumablePool > Pools
List of all consumable pools you manage.
Viel model for coffee machine related consumables.
readonly CoffeeConsumableManager mManager
void RebuildLists(object sender, NotifyCollectionChangedEventArgs e)
ObservableCollection< IngredientsForDevice > Ingredients
CoffeeConsumableViewModel(CoffeeConsumableManager value)
CoffeeConsumableViewModel()
For the XAML Designer.
ObservableCollection< CoffeeIngredient > Ingredients
Base class for all used mock coffee ingredients.