Beispiel #1
0
 // constructor - sets up the initial state and servers/database repo without starting
 public GarageMediator()
 {
     DatabaseCommunication = GarageRepository.Instance;
     MicroCommunication = RS232ServerFactory.Instance.CreateServer() as RS232Server;
     RFIDCommunication = Parallax28140ServerFactory.Instance.CreateServer() as Parallax28140Server;
     MediatorListeningState.IDScanned += (sender, id) => IDScanned(sender, DatabaseCommunication.GetGarageAssignment(id),
                                                                        DatabaseCommunication.GetVehicleInformation(id));
     State = new MediatorReadyState();
 }
Beispiel #2
0
 // constructor - sets up the initial state and servers/database repo without starting
 public GarageMediator()
 {
     DatabaseCommunication             = GarageRepository.Instance;
     MicroCommunication                = RS232ServerFactory.Instance.CreateServer() as RS232Server;
     RFIDCommunication                 = Parallax28140ServerFactory.Instance.CreateServer() as Parallax28140Server;
     MediatorListeningState.IDScanned += (sender, id) => IDScanned(sender, DatabaseCommunication.GetGarageAssignment(id),
                                                                   DatabaseCommunication.GetVehicleInformation(id));
     State = new MediatorReadyState();
 }