Example #1
0
 public void Trim(Barber barber)
 {
     lock (barbershop.FindChairLocker)
     {
         if (barber.Chair != null && !barber.Chair.Busy)
         {
             barber.Chair.ToLeave();
         }
     }
     Logger.Write($"{barber.Name} начал стричь {Name}");
     Thread.Sleep(new Random().Next(2_000, 3_000));
     Trimmed = true;
     Logger.Write($"{barber.Name} закончил стричь {Name}");
 }
Example #2
0
 private void Seat(Barber barber)
 {
     Busy    = false;
     Visitor = barber;
 }