public bool EnqueueCustomer(Customer c) { if (_opened && !IsFull()) { lock (this) { _queue.Enqueue(c); Program.Debug("Customer #" + c.ID + " -> SP #" + ID); } _notify(); return true; } return false; }
public static bool writeSim(Customer.CustomerStart[] simCustomers, Stream stream) { try { StreamWriter f = new StreamWriter(stream); foreach (Customer.CustomerStart cs in simCustomers) { f.WriteLine(cs.items + ";"// + cs.stat + ";" + cs.delay); } f.Flush(); return true; } catch (Exception e) { lastException = e; return false; } }