public void handelMachine(Griller grillerContext) { Console.WriteLine("{0}: starting to grill the meat", nameof(GrillerStartState)); grillerContext.GrillerState = new GrillingState(); grillerContext.GrillerState.handelMachine(grillerContext); }
public void handelMachine(Griller grillerContext) { Console.WriteLine("The griller is ready to use"); }
static void Main(string[] args) { Griller griller = new Griller(); griller.Grill(); }
public void handelMachine(Griller grillerContext) { Console.WriteLine("{0}: the meat es ready", nameof(GrillEndState)); grillerContext.GrillerState = new ReadyState(); grillerContext.GrillerState.handelMachine(grillerContext); }