Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Frier frier = new Frier();

            frier.DeepFrier();
            Console.ReadKey();
        }
Ejemplo n.º 2
0
 public void operateMachine(Frier frierContext)
 {
     Console.WriteLine("{0}: grilling the meat:", nameof(FryingState));
     frierContext.FrierState = new FrierEndState();
     frierContext.FrierState.operateMachine(frierContext);
 }
Ejemplo n.º 3
0
 public void operateMachine(Frier frierContext)
 {
     Console.WriteLine("{0}: the fries are ready", nameof(FrierEndState));
     frierContext.FrierState = new ReadyState();
     frierContext.FrierState.operateMachine(frierContext);
 }
Ejemplo n.º 4
0
 public void operateMachine(Frier frierContext)
 {
     Console.WriteLine("{0}: starting to fry potatoes ", nameof(FrierStartState));
     frierContext.FrierState = new FryingState();
     frierContext.FrierState.operateMachine(frierContext);
 }
Ejemplo n.º 5
0
 public void operateMachine(Frier frierContext)
 {
     Console.WriteLine("The frier is ready to use.");
 }