Esempio n. 1
0
        private void SendAnElevator(Elevator ElevatorToSend, Floor TargetFloor)
        {
            ElevatorToSend.AddNewFloorToTheList(TargetFloor);

            //Create new thread and send the elevator
            ThreadPool.QueueUserWorkItem(delegate { ElevatorToSend.PrepareElevatorToGoToNextFloorOnTheList(); });
        }
Esempio n. 2
0
 private static void SendAnElevator(Elevator elevator, Floor floor)
 {
     elevator.AddNewFloorToTheList(floor);
     ThreadPool.QueueUserWorkItem(delegate { elevator.PrepareElevatorToGoToNextFloorOnTheList(); });
 }
        private void SendAnElevator(Elevator ElevatorToSend, Floor TargetFloor)
        {
            ElevatorToSend.AddNewFloorToTheList(TargetFloor);

            //Create new thread and send the elevator
            ThreadPool.QueueUserWorkItem(delegate { ElevatorToSend.PrepareElevatorToGoToNextFloorOnTheList(); });
        }