public Car(IEngine engine, IGearBox gearBox, IOnBoardComputer computer, IDriveTrain driveTrain)
 {
     Engine = engine;
     GearBox = gearBox;
     Computer = computer;
     DriveTrain = driveTrain;
 }
Пример #2
0
        public void ConnectDriveTrain(IDriveTrain driveTrain)
        {
            _driveTrain = driveTrain;

            ThreadStart delegateDrive = new ThreadStart(ThreadDrive);
            Thread threadDrive = new Thread(delegateDrive);

            // Start driving thread
            threadDrive.Start();
        }