Пример #1
0
        public void PutPassengerInSmartFortwo(CrewMember passenger)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterPassenger(passenger);
        }
Пример #2
0
        public void PutDriverInSmartFortwo(CrewMember driver)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterDriver(driver);
        }
Пример #3
0
        public void PutBothInSmartFortwo(CrewMember driver, CrewMember passenger)
        {
            if (SmartFortwo.IsNull())
            {
                throw new Exception(_nullSmartFortwoException);
            }

            SmartFortwo.EnterDriver(driver);
            SmartFortwo.EnterPassenger(passenger);
        }
Пример #4
0
 public IEnumerable <CrewMember> DisembarkAllFromSmartFortwo()
 => SmartFortwo?.DisembarkAll()
 ?? throw new Exception(_nullSmartFortwoException);
Пример #5
0
 public CrewMember DisembarkDriverFromSmartFortwo()
 => SmartFortwo?.DisembarkDriver()
 ?? throw new Exception(_nullSmartFortwoException);
Пример #6
0
 public List <CrewMember> GetSmartFortwoCrewMembers()
 => SmartFortwo?.GetCrewMembers()
 ?? throw new Exception(_nullSmartFortwoException);
Пример #7
0
 public void SetSmartFortwo(SmartFortwo smartFortwo)
 => SmartFortwo = smartFortwo;