Example #1
0
 public static string Drain(string status)
 {
     Thread.Sleep(drain);
     if (status == boiled)
     {
         Console.WriteLine("Draining . . . .");
     }
     return(GetStatus.GetDescription(Status.Empty));
 }
Example #2
0
 public static string Fill(string status)
 {
     Thread.Sleep(fill);
     if (status == empty)
     {
         Console.WriteLine("Filling . . . .");
     }
     return(GetStatus.GetDescription(Status.Inprogress));
 }
Example #3
0
 public static string Boil(string status)
 {
     Thread.Sleep(boil);
     if (status == inProgress)
     {
         Console.WriteLine("Boiling . . . .");
     }
     return(GetStatus.GetDescription(Status.Boiled));
 }
Example #4
0
        public static void Process()
        {
            var status = GetStatus.GetDescription(Status.Empty);

            Console.WriteLine("Starting. . .");
            status = Fill(status);
            status = Boil(status);
            status = Drain(status);
            Thread.Sleep(drain);
        }