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