Esempio n. 1
0
 public override void Work(int currentTime)
 {
     if (currentTime > _startWrkTime && currentTime <= (_endWrkTime - 1))
     {
         Console.WriteLine(_workingMsg);
     }
     else if (NextShift != null)
     {
         NextShift.Work(currentTime);
     }
 }
Esempio n. 2
0
 public override String Work(int currentTime)
 {
     if (currentTime >= _startWrkTime && currentTime <= _endWrkTime)
     {
         return(String.Format("Hello, I'm a seller {0}, what do you have in your cart?", this.sellerName));
     }
     else if (NextShift != null)
     {
         return(NextShift.Work(currentTime));
     }
     return("No one works right now. This is an error"); // todo: debug?
 }