Ejemplo n.º 1
0
        public void ChangeMinNeededRunwaySize(string fixedwingId, double minNeededRunwaySize)
        {
            Fixedwing fixedwing = fixedwingsAccess.GetById(fixedwingId);

            if (fixedwing.AirportId != string.Empty)
            {
                Airport airport = airportsAccess.GetById(fixedwing.AirportId);
                if (minNeededRunwaySize > airport.RunwaySize)
                {
                    throw new Exception("Min needed runway size exceeds current airport runway size.");
                }
            }
            fixedwingsAccess.ChangeMinNeededRunwaySize(fixedwingId, minNeededRunwaySize);
        }
Ejemplo n.º 2
0
        public void ParkFixedwing(string airportId, string fixedwingId)
        {
            Airport   airport   = airportsAccess.GetById(airportId);
            Fixedwing fixedwing = fixedwingsAccess.GetById(fixedwingId);

            if (fixedwing.AirportId == string.Empty)
            {
                if (fixedwing.MinNeededRunwaySize < airport.RunwaySize)
                {
                    airportsAccess.ParkFixedwing(airportId, fixedwingId);
                    fixedwingsAccess.Park(fixedwingId, airportId);
                }
                else
                {
                    throw new Exception("Min needed runway size exceeds airport runway size.");
                }
            }
            else
            {
                throw new Exception($"Fixedwing {fixedwingId} already parks in airport {fixedwing.AirportId}.");
            }
        }
Ejemplo n.º 3
0
        public string SelectedFixedwing(string fixedwingId)
        {
            Fixedwing fixedwing = fixedwingsAccess.GetById(fixedwingId);

            return(fixedwing.FullInfo());
        }