public Meal prepare() { IUtensil utensil = ProvideUtensil(); ISpice spice = ProvideSpice(); // now do whatever steps are needed to prepare the meal... return(new Meal()); }
public Meal Prepare(Func <IUtensil> utensilSupplier, Func <ISpice> spiceSupplier) { ISpice spice = spiceSupplier.Invoke(); IUtensil utensil = utensilSupplier.Invoke(); // now do whatever steps are needed to prepare the meal... return(new Meal()); }