Пример #1
0
 public BusComponent()
 {
     mqClient         = new RabbitMqClient();
     cars             = new ConcurrentDictionary <string, BusCar>();
     commands         = new ConcurrentQueue <PassengersServiceCommand>();
     completionEvents = new ConcurrentDictionary <string, CountdownEvent>();
     playDelaySource  = new PlayDelaySource(timeFactor);
     transportMotion  = new TransportMotion.TransportMotion(Component.Bus, mqClient, playDelaySource);
 }
Пример #2
0
 public FuelTruck()
 {
     mqClient         = new RabbitMqClient();
     cars             = new ConcurrentDictionary <string, FuelTruckCar>();
     commands         = new ConcurrentQueue <RefuelServiceCommand>();
     completionEvents = new ConcurrentDictionary <string, CountdownEvent>();
     tokens           = new ConcurrentDictionary <string, CancellationTokenSource>();
     playDelaySource  = new PlayDelaySource(timeFactor);
     transportMotion  = new TransportMotion.TransportMotion(Component.FuelTruck, mqClient, playDelaySource);
 }