예제 #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;