public AirportProfile(
            string name,
            string code,
            string icaocode,
            AirportType type,
            Period<DateTime> period,
            Town town,
            TimeSpan offsetGMT,
            TimeSpan offsetDST,
            Coordinates coordinates,
            GeneralHelpers.Size cargo,
            double cargovolume,
            Weather.Season season)
        {
            PaxValues = new List<PaxValue>();

            Expansions = new List<AirportExpansion>();
            Name = name;
            Period = period;
            IATACode = code;
            ICAOCode = icaocode;
            Type = type;
            Town = town;
            Coordinates = coordinates;
            CargoVolume = cargovolume;
            MajorDestionations = new Dictionary<string, int>();
            Cargo = cargo;
            Logo = "";
            OffsetDST = offsetDST;
            OffsetGMT = offsetGMT;
            Season = season;
            ID =
                $"{char.ConvertToUtf32(IATACode, 0):00}-{char.ConvertToUtf32(IATACode, 1):00}-{char.ConvertToUtf32(IATACode, 2):00}-{name.Length:00}-{char.ConvertToUtf32(Name, Name.Length/2):00}-{(int) Cargo:00}";
        }
        public virtual IQueryable <AirportType> GetAirportType(AirportType airportType)
        {
            var airportTypeParameter = new ObjectParameter("AirportType", airportType);

            return(((IObjectContextAdapter)this).ObjectContext
                   .CreateQuery <AirportType>(
                       string.Format("[{0}].{1}", GetType().Name, "[GetAirportType](@AirportType)"),
                       airportTypeParameter));
        }
Exemple #3
0
        public void TestCreate()
        {
            var airport = AirportType.Create(new AirportSnapshot {
                Code = "PEK", DisplayName = "Beijing Capital International"
            });

            Assert.Equal("PEK", airport.Code);

            Assert.Equal("Beijing Capital International", airport.DisplayName);
        }
Exemple #4
0
        public AirportProfile(string name, string code, string icaocode, AirportType type, Period <DateTime> period, Town town, TimeSpan offsetGMT, TimeSpan offsetDST, Coordinates coordinates, GeneralHelpers.Size cargo, double cargovolume, Weather.Season season)
        {
            this.PaxValues = new List <PaxValue>();

            this.Name               = name;
            this.Period             = period;
            this.IATACode           = code;
            this.ICAOCode           = icaocode;
            this.Type               = type;
            this.Town               = town;
            this.Coordinates        = coordinates;
            this.CargoVolume        = cargovolume;
            this.MajorDestionations = new Dictionary <string, int>();
            this.Cargo              = cargo;
            this.Logo               = "";
            this.OffsetDST          = offsetDST;
            this.OffsetGMT          = offsetGMT;
            this.Season             = season;
            this.ID = string.Format("{0:00}-{1:00}-{2:00}-{3:00}-{4:00}-{5:00}", char.ConvertToUtf32(this.IATACode, 0), char.ConvertToUtf32(this.IATACode, 1), char.ConvertToUtf32(this.IATACode, 2), name.Length, char.ConvertToUtf32(this.Name, this.Name.Length / 2), (int)this.Cargo);
        }
        public AirportProfile(string name, string code, string icaocode, AirportType type, Period<DateTime> period, Town town, TimeSpan offsetGMT, TimeSpan offsetDST, Coordinates coordinates, GeneralHelpers.Size cargo, double cargovolume, Weather.Season season)
        {
            this.PaxValues = new List<PaxValue>();

            this.Name = name;
            this.Period = period;
            this.IATACode = code;
            this.ICAOCode = icaocode;
            this.Type = type;
            this.Town = town;
            this.Coordinates = coordinates;
            this.CargoVolume = cargovolume;
            this.MajorDestionations = new Dictionary<string, int>();
            this.Cargo = cargo;
            this.Logo = "";
            this.OffsetDST = offsetDST;
            this.OffsetGMT = offsetGMT;
            this.Season = season;
            this.ID = string.Format("{0:00}-{1:00}-{2:00}-{3:00}-{4:00}-{5:00}", char.ConvertToUtf32(this.IATACode, 0), char.ConvertToUtf32(this.IATACode, 1), char.ConvertToUtf32(this.IATACode, 2), name.Length, char.ConvertToUtf32(this.Name, this.Name.Length / 2), (int)this.Cargo);
        }
Exemple #6
0
 public static Airport GetAirport(AirportType type)
 {
     return(_aiports[type]());
 }
Exemple #7
0
 /**
  * Get the height of this type of airport.
  * @param type The type of airport.
  * @returns The height in tiles.
  */
 public static int GetAirportHeight(AirportType type)
 {
     throw null;
 }
Exemple #8
0
 /**
  * Builds a airport with tile at the topleft corner.
  * @param tile The topleft corner of the airport.
  * @param type The type of airport to build.
  * @param station_id The station to join, AIStation.STATION_NEW or AIStation.STATION_JOIN_ADJACENT.
  * @exception AIError.ERR_AREA_NOT_CLEAR
  * @exception AIError.ERR_FLAT_LAND_REQUIRED
  * @exception AIError.ERR_LOCAL_AUTHORITY_REFUSES
  * @exception AIStation.ERR_STATION_TOO_LARGE
  * @exception AIStation.ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
  * @returns Whether the airport has been/can be build or not.
  */
 public static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id)
 {
     throw null;
 }
Exemple #9
0
 /**
  * Get the cost to build this AirportType.
  * @param type The AirportType to check.
  * @returns The cost of building this AirportType.
  */
 public static long GetPrice(AirportType type)
 {
     throw null;
 }
Exemple #10
0
 /**
  * Can you get information on this airport type? As opposed to
  * IsValidAirportType this will return also return true when
  * an airport type is no longer buildable.
  * @param type The AirportType to check.
  * @returns True if and only if the AirportType is valid.
  */
 public static bool IsAirportInformationAvailable(AirportType type)
 {
     throw null;
 }
Exemple #11
0
 /**
  * Checks whether the given AirportType is valid and available.
  * @param type The AirportType to check.
  * @returns True if and only if the AirportType is valid and available.
  */
 public static bool IsValidAirportType(AirportType type)
 {
     throw null;
 }
Exemple #12
0
 /**
  * Get the monthly maintenance cost of an airport type.
  * @param type The airport type to get the monthly maintenance cost of.
  * @returns Monthly maintenance cost of the airport type.
  */
 public static long GetMonthlyMaintenanceCost(AirportType type)
 {
     throw null;
 }
Exemple #13
0
 /**
  * Get the maintenance cost factor of an airport type.
  * @param type The airport type to get the maintenance factor of.
  * @returns Maintenance cost factor of the airport type.
  */
 public static int GetMaintenanceCostFactor(AirportType type)
 {
     throw null;
 }
Exemple #14
0
 /**
  * Get the TownID of the town whose local authority will influence
  *  an airport at some tile.
  * @param tile The tile to check.
  * @param type The AirportType to check.
  * @returns The TownID of the town closest to the tile.
  */
 public static TownID GetNearestTown(TileIndex tile, AirportType type)
 {
     throw null;
 }
Exemple #15
0
 /**
  * Get the noise that will be added to the nearest town if an airport was
  *  built at this tile.
  * @param tile The tile to check.
  * @param type The AirportType to check.
  * @returns The amount of noise added to the nearest town.
  * @note The noise will be added to the town with TownID GetNearestTown(tile, type).
  */
 public static int GetNoiseLevelIncrease(TileIndex tile, AirportType type)
 {
     throw null;
 }
Exemple #16
0
 /**
  * Get the width of this type of airport.
  * @param type The type of airport.
  * @returns The width in tiles.
  */
 public static int GetAirportWidth(AirportType type)
 {
     throw null;
 }
        public virtual ObjectResult <AirportType> GetAirportTypeSP(AirportType airportType)
        {
            var airportTypeParameter = new ObjectParameter("AirportType", airportType);

            return(((IObjectContextAdapter)this).ObjectContext.ExecuteFunction <AirportType>("GetAirportTypeSP", airportTypeParameter));
        }
Exemple #18
0
 /**
  * Get the coverage radius of this type of airport.
  * @param type The type of airport.
  * @returns The radius in tiles.
  */
 public static int GetAirportCoverageRadius(AirportType type)
 {
     throw null;
 }