예제 #1
0
 public FlightPlan(
     string aircraft,
     string cruisingSpeed,
     Aerodrome departureAerodrome,
     string cruisingLevel,
     Aerodrome destinationAerodrome,
     int revision,
     FlightRules flightRules,
     int departureTime,
     int actualDepartureTime,
     int eetHours,
     int eetMinutes,
     int enduranceHours,
     int enduranceMinutes,
     Aerodrome alternateAerodrome,
     string otherInfo,
     string route,
     Aerodrome secondAlternateAerodrome,
     FlightType typeOfFlight,
     int personsOnBoard)
 {
     Aircraft             = aircraft ?? string.Empty;
     CruisingSpeed        = cruisingSpeed ?? string.Empty;
     DepartureAerodrome   = departureAerodrome;
     CruisingLevel        = cruisingLevel ?? string.Empty;
     DestinationAerodrome = destinationAerodrome;
     Revision             = revision;
     FlightRules          = flightRules;
     DepartureTime        = departureTime;
     ActualDepartureTime  = actualDepartureTime;
     EETHours             = eetHours;
     EETMinutess          = eetMinutes;
     EnduranceHours       = enduranceHours;
     EnduranceMinutes     = enduranceMinutes;
     AlternateAerodrome   = alternateAerodrome;
     OtherInfo            = otherInfo ?? string.Empty;
     Route = route ?? string.Empty;
     SecondAlternateAerodrome = secondAlternateAerodrome;
     TypeOfFlight             = typeOfFlight;
     PersonsOnBoard           = personsOnBoard;
 }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(obj, null))
            {
                return(false);
            }

            if (ReferenceEquals(obj, this))
            {
                return(true);
            }

            Aerodrome casted = obj as Aerodrome;

            if (casted == null)
            {
                return(false);
            }

            return(string.Equals(casted.ICAO, ICAO, StringComparison.InvariantCultureIgnoreCase));
        }
예제 #3
0
 public FlightPlanBuilder WithDepartureAerodrome(Aerodrome departureAerodrome)
 {
     _departureAerodrome = departureAerodrome;
     return(this);
 }
예제 #4
0
 public FlightPlanBuilder WithSecondAlternateAerodrome(Aerodrome secondAlternateAerodrome)
 {
     _secondAlternateAerodrome = secondAlternateAerodrome;
     return(this);
 }
예제 #5
0
 public FlightPlanBuilder WithAlternateAerodrome(Aerodrome alternateAerodrome)
 {
     _alternateAerodrome = alternateAerodrome;
     return(this);
 }
예제 #6
0
 public FlightPlanBuilder WithDestinationAerodrome(Aerodrome destinationAerodrome)
 {
     _destinationAerodrome = destinationAerodrome;
     return(this);
 }