List<IRecipe> GetCurrentRecipes()
{
switch (_currentComponent) {
case ComponentType.Dough:
return Definitions.All.Doughs.All.OfType<IRecipe> ().ToList ();
case ComponentType.Sauce:
return Definitions.All.Sauces.All.OfType<IRecipe> ().ToList ();
case ComponentType.Topping:
return Definitions.All.Toppings.All.OfType<IRecipe> ().ToList ();
default:
throw new Exception ("Wrong state: " + _currentComponent);
}
}