C# Class TheAirline.Helpers.AirportHelpers

Exibir arquivo Open project: TheAirlineProject/tap-desktop

Public Methods

Method Description
AddAirlineContract ( AirportContract contract ) : void
CanFillRoutesEntries ( Airport airport, Airline airline, List contracts, Weather season ) : bool
CheckForExtendGates ( Airport airport ) : void
CheckForExtendRunway ( Airport airport ) : void
ClearAirportStatistics ( ) : void
ConvertAirportPaxToSize ( double size ) : GeneralHelpers.Size
CreateAirportWeather ( Airport airport ) : void
CreateAirportsWeather ( List airports, WeatherAverage average ) : void
CreateFiveDaysAirportWeather ( Airport airport ) : void
GetAirportContractPrice ( Airport airport ) : double
GetAirportLandings ( Airport airport, DayOfWeek day, System.TimeSpan startTime, System.TimeSpan endTime ) : List
GetAirportRoutes ( Airport airport ) : List
GetAirportRoutes ( Airport airport, Airline airline ) : List
GetAirportRoutes ( Airport airport1, Airport airport2 ) : List
GetAirportRunwayPrice ( Airport airport, long lenght ) : double
GetAirportTakeoffs ( Airport airport, DayOfWeek day, System.TimeSpan startTime, System.TimeSpan endTime ) : List
GetAirportsNearAirport ( Airport airport, double distance ) : List
GetFuelPrice ( Airport airport ) : double
GetFuelPrice ( Region region ) : double
GetHubPrice ( Airport airport, HubType type ) : double
GetLandingFee ( Airport airport, Airliner airliner ) : double
GetLongestDistance ( Predicate match ) : double
GetNumberOfAirportsRoutes ( Airport airport1, Airport airport2 ) : int
GetOccupiedSlotTimes ( Airport airport, Airline airline, List contracts, Weather season ) : List
GetOccupiedSlotTimes ( Airport airport, Airline airline, Weather season, Terminal type ) : List
GetShortestDistance ( Predicate match ) : double
GetStandardLandingFee ( Airport airport ) : double
GetYearlyContractPayment ( Airport airport, AirportContract type, int gates, int length ) : double
HasBadWeather ( Airport airport ) : bool
HasFreeGates ( Airport airport, Airline airline ) : bool
HasFreeGates ( Airport airport, Airline airline, Terminal type ) : bool
HasRoute ( Airport airport1, Airport airport2 ) : bool
ReallocateAirport ( Airport airportOld, Airport airportNew ) : void
RentGates ( Airport airport, Airline airline, AirportContract type ) : bool
RentGates ( Airport airport, Airline airline, AirportContract type, Terminal terminaltype ) : bool
RentGates ( Airport airport, Airline airline, AirportContract type, Terminal terminaltype, int gates, int length = 20 ) : void
SetAirportExpansion ( Airport airport, AirportExpansion expansion, bool onStartUp = false ) : void

Private Methods

Method Description
CreateDayWeather ( Airport airport, System.DateTime date, Weather previousWeather ) : Weather
CreateDayWeather ( System.DateTime date, Weather previousWeather, WeatherAverage average ) : Weather
GetPrecipitation ( double temperature ) : Weather.Precipitation

Method Details

AddAirlineContract() public static method

public static AddAirlineContract ( AirportContract contract ) : void
contract TheAirline.Models.Airports.AirportContract
return void

CanFillRoutesEntries() public static method

public static CanFillRoutesEntries ( Airport airport, Airline airline, List contracts, Weather season ) : bool
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
contracts List
season TheAirline.Models.General.Environment.Weather
return bool

CheckForExtendGates() public static method

public static CheckForExtendGates ( Airport airport ) : void
airport TheAirline.Models.Airports.Airport
return void

CheckForExtendRunway() public static method

public static CheckForExtendRunway ( Airport airport ) : void
airport TheAirline.Models.Airports.Airport
return void

ClearAirportStatistics() public static method

public static ClearAirportStatistics ( ) : void
return void

ConvertAirportPaxToSize() public static method

public static ConvertAirportPaxToSize ( double size ) : GeneralHelpers.Size
size double
return GeneralHelpers.Size

CreateAirportWeather() public static method

public static CreateAirportWeather ( Airport airport ) : void
airport TheAirline.Models.Airports.Airport
return void

CreateAirportsWeather() public static method

public static CreateAirportsWeather ( List airports, WeatherAverage average ) : void
airports List
average TheAirline.Models.General.Environment.WeatherAverage
return void

CreateFiveDaysAirportWeather() public static method

public static CreateFiveDaysAirportWeather ( Airport airport ) : void
airport TheAirline.Models.Airports.Airport
return void

GetAirportContractPrice() public static method

public static GetAirportContractPrice ( Airport airport ) : double
airport TheAirline.Models.Airports.Airport
return double

GetAirportLandings() public static method

public static GetAirportLandings ( Airport airport, DayOfWeek day, System.TimeSpan startTime, System.TimeSpan endTime ) : List
airport TheAirline.Models.Airports.Airport
day DayOfWeek
startTime System.TimeSpan
endTime System.TimeSpan
return List

GetAirportRoutes() public static method

public static GetAirportRoutes ( Airport airport ) : List
airport TheAirline.Models.Airports.Airport
return List

GetAirportRoutes() public static method

public static GetAirportRoutes ( Airport airport, Airline airline ) : List
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
return List

GetAirportRoutes() public static method

public static GetAirportRoutes ( Airport airport1, Airport airport2 ) : List
airport1 TheAirline.Models.Airports.Airport
airport2 TheAirline.Models.Airports.Airport
return List

GetAirportRunwayPrice() public static method

public static GetAirportRunwayPrice ( Airport airport, long lenght ) : double
airport TheAirline.Models.Airports.Airport
lenght long
return double

GetAirportTakeoffs() public static method

public static GetAirportTakeoffs ( Airport airport, DayOfWeek day, System.TimeSpan startTime, System.TimeSpan endTime ) : List
airport TheAirline.Models.Airports.Airport
day DayOfWeek
startTime System.TimeSpan
endTime System.TimeSpan
return List

GetAirportsNearAirport() public static method

public static GetAirportsNearAirport ( Airport airport, double distance ) : List
airport TheAirline.Models.Airports.Airport
distance double
return List

GetFuelPrice() public static method

public static GetFuelPrice ( Airport airport ) : double
airport TheAirline.Models.Airports.Airport
return double

GetFuelPrice() public static method

public static GetFuelPrice ( Region region ) : double
region TheAirline.Models.General.Countries.Region
return double

GetHubPrice() public static method

public static GetHubPrice ( Airport airport, HubType type ) : double
airport TheAirline.Models.Airports.Airport
type TheAirline.Models.Airports.HubType
return double

GetLandingFee() public static method

public static GetLandingFee ( Airport airport, Airliner airliner ) : double
airport TheAirline.Models.Airports.Airport
airliner TheAirline.Models.Airliners.Airliner
return double

GetLongestDistance() public static method

public static GetLongestDistance ( Predicate match ) : double
match Predicate
return double

GetNumberOfAirportsRoutes() public static method

public static GetNumberOfAirportsRoutes ( Airport airport1, Airport airport2 ) : int
airport1 TheAirline.Models.Airports.Airport
airport2 TheAirline.Models.Airports.Airport
return int

GetOccupiedSlotTimes() public static method

public static GetOccupiedSlotTimes ( Airport airport, Airline airline, List contracts, Weather season ) : List
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
contracts List
season TheAirline.Models.General.Environment.Weather
return List

GetOccupiedSlotTimes() public static method

public static GetOccupiedSlotTimes ( Airport airport, Airline airline, Weather season, Terminal type ) : List
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
season TheAirline.Models.General.Environment.Weather
type TheAirline.Models.Airports.Terminal
return List

GetShortestDistance() public static method

public static GetShortestDistance ( Predicate match ) : double
match Predicate
return double

GetStandardLandingFee() public static method

public static GetStandardLandingFee ( Airport airport ) : double
airport TheAirline.Models.Airports.Airport
return double

GetYearlyContractPayment() public static method

public static GetYearlyContractPayment ( Airport airport, AirportContract type, int gates, int length ) : double
airport TheAirline.Models.Airports.Airport
type TheAirline.Models.Airports.AirportContract
gates int
length int
return double

HasBadWeather() public static method

public static HasBadWeather ( Airport airport ) : bool
airport TheAirline.Models.Airports.Airport
return bool

HasFreeGates() public static method

public static HasFreeGates ( Airport airport, Airline airline ) : bool
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
return bool

HasFreeGates() public static method

public static HasFreeGates ( Airport airport, Airline airline, Terminal type ) : bool
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airports.Terminal
return bool

HasRoute() public static method

public static HasRoute ( Airport airport1, Airport airport2 ) : bool
airport1 TheAirline.Models.Airports.Airport
airport2 TheAirline.Models.Airports.Airport
return bool

ReallocateAirport() public static method

public static ReallocateAirport ( Airport airportOld, Airport airportNew ) : void
airportOld TheAirline.Models.Airports.Airport
airportNew TheAirline.Models.Airports.Airport
return void

RentGates() public static method

public static RentGates ( Airport airport, Airline airline, AirportContract type ) : bool
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airports.AirportContract
return bool

RentGates() public static method

public static RentGates ( Airport airport, Airline airline, AirportContract type, Terminal terminaltype ) : bool
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airports.AirportContract
terminaltype TheAirline.Models.Airports.Terminal
return bool

RentGates() public static method

public static RentGates ( Airport airport, Airline airline, AirportContract type, Terminal terminaltype, int gates, int length = 20 ) : void
airport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airports.AirportContract
terminaltype TheAirline.Models.Airports.Terminal
gates int
length int
return void

SetAirportExpansion() public static method

public static SetAirportExpansion ( Airport airport, AirportExpansion expansion, bool onStartUp = false ) : void
airport TheAirline.Models.Airports.Airport
expansion TheAirline.Models.Airports.AirportExpansion
onStartUp bool
return void