The pre-made pizza (beef lovers pizza for example) are collections of strings as their toppings, whereas there nothing preventing a person from putting anchovies onto a veggie pizza, or as part of the 'recipe'
so - for instance
{ "Meat Lovers", new[] { "pepperoni", "beef", "sausage", "ham", "Soilent Green"} },
is a technically correct, because a meat pizza is a Lazy<Dictionary<string, string[]> whereas it should probably be :
Lazy<Dictionary<string, _meats[]>
(not sure of syntax here)
Perhaps these should be refactored, so that a pizza has a list of toppings of a type, preventing a shop from offering a veggie pizza with accidental meat. If should also mean that from a type safety point of view that it wouldn't be possible to add an ingredient to a pizza without it existing already in the Meat / veggies type.
The pre-made pizza (beef lovers pizza for example) are collections of strings as their toppings, whereas there nothing preventing a person from putting anchovies onto a veggie pizza, or as part of the 'recipe'
so - for instance
{ "Meat Lovers", new[] { "pepperoni", "beef", "sausage", "ham", "Soilent Green"} },
is a technically correct, because a meat pizza is a
Lazy<Dictionary<string, string[]>whereas it should probably be :Lazy<Dictionary<string, _meats[]>(not sure of syntax here)
Perhaps these should be refactored, so that a pizza has a list of toppings of a type, preventing a shop from offering a veggie pizza with accidental meat. If should also mean that from a type safety point of view that it wouldn't be possible to add an ingredient to a pizza without it existing already in the Meat / veggies type.