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}"); }
private void Seat(Barber barber) { Busy = false; Visitor = barber; }