示例#1
0
 public static string Drain(string status)
 {
     Thread.Sleep(drain);
     if (status == boiled)
     {
         Console.WriteLine("Draining . . . .");
     }
     return(GetStatus.GetDescription(Status.Empty));
 }
示例#2
0
 public static string Fill(string status)
 {
     Thread.Sleep(fill);
     if (status == empty)
     {
         Console.WriteLine("Filling . . . .");
     }
     return(GetStatus.GetDescription(Status.Inprogress));
 }
示例#3
0
 public static string Boil(string status)
 {
     Thread.Sleep(boil);
     if (status == inProgress)
     {
         Console.WriteLine("Boiling . . . .");
     }
     return(GetStatus.GetDescription(Status.Boiled));
 }
示例#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);
        }