示例#1
0
        public Customer generateCustomer()
        {
            Customer customer = null;

            if (shouldGenerateCustomer())
            {
                customer = new Customer { firstName = generator.GetFirstName(), lastName = generator.GetLastName() };
            }

            return customer;
        }
示例#2
0
文件: Store.cs 项目: LulalaBoss/Demo
 public void usheringCustomer(Customer customer)
 {
     // check if there are available tables. If it does, fill it
     if (tables.Count < tableNumber)
     {
         tables.Add(customer);
     }
     // else put them in the waiting line, if it's not full
     else if (line.Count < lineSize)
     {
         line.Add(customer);
     }
     // the line is too long! Customer is gone
 }